Gets the natural logarithm of a number.
Log ( n )
Argument |
Description |
---|---|
n |
The number for which you want the natural logarithm (base e). The value of n must be greater than 0. |
Double. Returns the natural logarithm of n. An execution error occurs if n is negative or zero.
This expression returns 2.302585092:
Log(10)
This expression returns -.693147 ... :
Log(0.5)
Both these expressions result in an error at runtime:
Log(0) Log(-2)