(log number)


Calculate the natural logarithm.


This function returns the natural logarithm, even though "ln" is usually considered the natural log in mathematics. This function cannot take a negative number. The result is a real number.

Examples

Code Returns
(log 0) 1.000000
(log 9) 2.19722
(log 10) 2.30239
(log 2.30239) 0.834035

NOTE The exp function is the opposite of the log function.

Tell me about...

(expt base power)

(log10 number)

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language