Return the natural (base e) logarithm of a specified BigInteger in CSharp
Description
The following code shows how to return the natural (base e) logarithm of a specified BigInteger.
Example
/*from w w w. j a v a 2 s .c om*/
using System;
using System.Numerics;
public class Example
{
public static void Main()
{
BigInteger[] values = { 2, 100, BigInteger.Pow(2, 64) };
foreach (var value in values)
Console.WriteLine(Math.Exp(BigInteger.Log(value) / 2));
}
}
The code above generates the following result.