C# BigInteger Log(BigInteger)
Description
BigInteger Log(BigInteger)
Returns the natural (base
e) logarithm of a specified number.
Syntax
BigInteger.Log(BigInteger)
has the following syntax.
public static double Log(
BigInteger value
)
Parameters
BigInteger.Log(BigInteger)
has the following parameters.
value
- The number whose logarithm is to be found.
Returns
BigInteger.Log(BigInteger)
method returns The natural (base e) logarithm of value, as shown in the table in the Remarks
section.
Example
using System;// ww w.j a v a 2 s.co m
using System.Numerics;
public class Example
{
public static void Main()
{
BigInteger[] values = { 2, BigInteger.Pow(1000, 100),BigInteger.Pow(2, 64) };
foreach (var value in values)
Console.WriteLine("The square root of {0} is {1}", value,
Math.Exp(BigInteger.Log(value) / 2));
}
}
The code above generates the following result.