System Namespace Math Class
Returns the logarithm of a specified number in a specified base.
[ VB ]
Overloads Public Shared Function Log ( _
ByVal a As Double, _
ByVal newBase As Double _
) As Double
[ C# ]
public static double Log (
double a,
double newBase
);
[ C++ ]
public: static double Log (
double a,
double newBase
);
[ JScript ]
public static function Log (
a : double,
newBase : double
) : double;
- a
- A number whose logarithm is to be found.
- newBase
- The base of the logarithm.
Sign of a |
Returns |
Positive |
The logarithm of a, in base, newBase; that is, lognewBase a. |
Zero |
PositiveInfinity |
Negative |
NaN |
If a is equal to PositiveInfinity and newBase is not equal to PositiveInfinity, NegativeInfinity, or NaN, this method returns PositiveInfinity. If newBase is equal to PositiveInfinity and a is not equal to PositiveInfinity, NegativeInfinity, or NaN, this method returns 0. If both a and newBase are equal to PositiveInfinity, or a or newBase is equal to NaN or NegativeInfinity, this method returns NaN.
Parameters a and newBase are specified as base 10 numbers.
Math Members Math.Log Overload List