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
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:
The following example calculates a numerical estimation of log2(4):
Last updated