Log Method (BigInteger)
Collapse the table of content
Expand the table of content

BigInteger::Log Method (BigInteger)

 

Returns the natural (base e) logarithm of a specified number.

Namespace:   System.Numerics
Assembly:  System.Numerics (in System.Numerics.dll)

public:
static double Log(
	BigInteger value
)

Parameters

value
Type: System.Numerics::BigInteger

The number whose logarithm is to be found.

Return Value

Type: System::Double

The natural (base e) logarithm of value, as shown in the table in the Remarks section.

Exception Condition
ArgumentOutOfRangeException

The natural log of value is out of range of the Double data type.

The value parameter is specified as a base 10 number.

The precise return value of this method depends on the sign of value, as the following table shows.

Sign of value parameter

Return value

Positive

The natural logarithm of value; that is, ln value, or log evalue.

Zero

NegativeInfinity.

Negative

NaN.

To calculate the base 10 logarithm of a BigInteger value, call the Log10 method. To calculate the logarithm of a number in another base, call the Log(BigInteger, Double) method.

You can find the square root of a number by calling the Log method along with the Math::Exp method. Note that the result is Double::PositiveInfinity if the result is greater than Double::MaxValue. The following example calculates the square root of each element in an array of BigInteger values.

No code example is currently available or this language may not be supported.

This method corresponds to the Math::Log(Double) method for the primitive numeric types.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Windows Phone
Available since 8.1
Return to top
Show:
© 2016 Microsoft