Log

This function determines the natural logarithm of a number.

Syntax

Log(number)

Parameters

number
Any valid numeric expression greater than 0.

Return Values

Returns the natural logarithm of a number.

Remarks

The natural logarithm is the logarithm to the base e. The constant e is approximately 2.718282.

You can calculate base-n logarithms for any number x by dividing the natural logarithm of x by the natural logarithm of n. The following code example shows how to calculate base-n logarithms.

Logn(x) = Log(x) / Log(n)

The following code example shows a custom function that calculates base-10 logarithms:

Function Log10(X)
    Log10 = Log(X) / Log(10)
End Function