C# Math Log(Double)
Description
Math Log(Double)
returns the natural (base e) logarithm
of a specified number.
Syntax
Math.Log(Double)
has the following syntax.
public static double Log(
double d
)
Parameters
Math.Log(Double)
has the following parameters.
d
- The number whose logarithm is to be found.
Returns
Math.Log(Double)
method returns One of the values in the following table. d parameter Return value Positive
The natural logarithm of d; that is, ln d, or log e d Zero NegativeInfinity
Negative NaN Equal to NaN NaN Equal to PositiveInfinity PositiveInfinity
Example
The following example illustrates the Log method.
//from w ww .j av a2s . c o m
using System;
public class Example
{
public static void Main()
{
Console.WriteLine(Math.Log(100));
}
}
The code above generates the following result.