Export (0) Print
Expand All

BigInteger.Log Method (BigInteger, Double)

Returns the logarithm of a specified number in a specified base.

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

public static double Log(
	BigInteger value,
	double baseValue
)

Parameters

value
Type: System.Numerics.BigInteger

A number whose logarithm is to be found.

baseValue
Type: System.Double

The base of the logarithm.

Return Value

Type: System.Double
The base baseValue logarithm of value, as shown in the table in the Remarks section.

ExceptionCondition
ArgumentOutOfRangeException

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

The value and baseValue parameters are specified as base 10 numbers.

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

value parameter

baseValue parameter

Return value

value > 0

(0 < baseValue < 1) -or-(baseValue > 1)

logbaseValue(value)

value < 0

(any value)

Double.NaN

(any value)

baseValue < 0

Double.NaN

value != 1

baseValue = 0

Double.NaN

value != 1

baseValue = Double.PositiveInfinity

Double.NaN

(any value)

baseValue = Double.NaN

Double.NaN

(any value)

baseValue = 1

Double.NaN

value = 0

0 < baseValue < 1

Double.PositiveInfinity

value = 0

baseValue > 1

Double.PositiveInfinity

value = 1

baseValue = 0

0

value = 1

baseValue = Double.PositiveInfinity

0

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

This method corresponds to the Math.Log method for the primitive numeric types.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

.NET for Windows Phone apps

Supported in: Windows Phone 8.1

Windows Phone 8.1, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft