LOG

The function LOG takes two Numbers, call them _x** and **b, and returns a numerical approximation of logbx\log _{b} 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 logbx\log _{b} x.

Examples

The following example calculates a numerical estimation of log102\log _{10} 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 log24\log _{2} 4:

LOG(4, 2) -> 2

Last updated