Skip to main content

Number.Log

Returns the logarithm of the number to the specified base (default e).

Syntax

Number.Log(
number as number,
optional base as number
) as number

Remarks

Returns the logarithm of a number, number, to the specified base base. If base is not specified, the default value is Number.E. If number is null Number.Log returns null.

Examples

Example #1

Get the base 10 logarithm of 2.

Number.Log(2, 10)

Result:

0.3010299956639812

Example #2

Get the base e logarithm of 2.

Number.Log(2)

Result:

0.69314718055994529

Category

Number.Operations