C# Math Log10

Description

Math Log10 returns the base 10 logarithm of a specified number.

Syntax

Math.Log10 has the following syntax.


public static double Log10(
  double d
)

Parameters

Math.Log10 has the following parameters.

  • d - A number whose logarithm is to be found.

Returns

Math.Log10 method returns One of the values in the following table. d parameter Return value Positive The base 10 log of d; that is, log 10 d. Zero NegativeInfinity Negative NaN Equal to NaN NaN Equal to PositiveInfinity PositiveInfinity

Example

The following example uses the Log10 method to return the base 10 logarithm for selected values.


//from  w  w w .  j  a v  a2s .  c  om
using System;

public class Example
{
   public static void Main()
   {
      Console.WriteLine(Math.Log10(100));
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version