Log

Description

Gets the natural logarithm of a number.

Syntax

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.


Return value

Double. Returns the natural logarithm of n. An execution error occurs if n is negative or zero.

Inverse

The inverse of the Log function is the Exp function.

Examples

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)

See also

Exp

LogTen