C# Math Log(Double, Double)
Description
Math Log(Double, Double)
returns the logarithm of a specified
number in a specified base.
Syntax
Math.Log(Double, Double)
has the following syntax.
public static double Log(
double a,
double newBase
)
Parameters
Math.Log(Double, Double)
has the following parameters.
a
- The number whose logarithm is to be found.newBase
- The base of the logarithm.
Returns
Math.Log(Double, Double)
method returns log result.
Example
The following example uses Log to evaluate certain logarithmic identities for selected values.
/*w w w . j a va 2 s . c o m*/
using System;
class LogDLogDD
{
public static void Main()
{
Console.WriteLine(Math.Log(10,100) );
}
}
The code above generates the following result.