Skip to main content

log

log (num)

The log function returns the log base 10 of num.

It returns -INF if num is 0, and returns NaN if num is less than 0.

To compute a logarithm base n use the formula:

logn(x)=log(x)log(n).\displaystyle \log _{n}(x)=\frac{\log (x)}{\log (n)}.

See Also

ln