MathLog Method (Double, Double) |
Returns the logarithm of a specified number in a specified base.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public static double Log(
double a,
double newBase
)
Parameters
- a
- Type: SystemDouble
A number whose logarithm is to be found. - newBase
- Type: SystemDouble
The base of the logarithm.
Return Value
Type:
DoubleOne of the values in the following table. (+Infinity denotes
PositiveInfinity, -Infinity denotes
NegativeInfinity, and NaN denotes
NaN.)
anewBaseReturn value
a> 0(0 <
newBase< 1) -or-(
newBase> 1)lognewBase(a)
a< 0(any value)NaN(any value)
newBase< 0NaN
a != 1
newBase = 0NaN
a != 1
newBase = +InfinityNaN
a = NaN(any value)NaN(any value)
newBase = NaNNaN(any value)
newBase = 1NaN
a = 00 <
newBase< 1 +Infinity
a = 0
newBase> 1-Infinity
a = +Infinity0 <
newBase< 1-Infinity
a = +Infinity
newBase> 1+Infinity
a = 1
newBase = 00
a = 1
newBase = +Infinity0
See Also