LOG

The function LOG takes two Numbers, call them x and b, and returns a numerical approximation of logb(x).

This function requires a single Number as input. It will return another Number: by default, the base 10 logarithm of the given number. To calculate the a logarithm with another base, this function also accepts an optional Number as input to define the base of the logarithm.

Declaration

LOG(x, b) -> number

Parameters

x (required, type: Number) Any positive number.

b (optional, type: Number, default: 10) The base of the logarithm.

Return Values

number (type: Number) A numerical estimation of the base b logarithm of n. Mathematically, this is given by logb(x).

Examples

The following example calculates a numerical estimation of log10(2). Note that the logarithm base is not explicitly specified, as 10 is the default value of b:

LOG(2) -> 0.30102999566398114

The following example calculates a numerical estimation of log2(4):

LOG(4, 2) -> 2

Last updated