The LOG()
function returns the logarithm of a number to the specific base.
Figure 1 shows the mathematical representation of the LOG()
function:
LOG(base, number)
This function requires two parameters:
base
of the LOG()
returns the logarithm of a number to the specific base sent as a parameter.
If the base is omitted, then the
LOG()
function calculates the natural logarithm of a number, which is the same as theLOG()
function with a base of the mathematical constante
.
If the base is less than one, or the
number
is less thanzero
, the function will returnNULL
.
/*example showing how to use LOG(base, number)*/-- positive number without baseselect LOG(10);-- positive number with baseselect LOG(3,3);-- zero number with baseselect LOG(2,0);-- positive number with base 0select LOG(0,2);