Skip to main content

ln

ln (num)

The ln function returns the natural logarithm of num, -INF if num is 0, or NaN if num is less than 0. In complex expressions, num is complex, and ln(num) returns a complex value.

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

log