returns the natural logarithm of a number.
# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
the ln of number
# Params
- number : A positive number, or an expression that evaluates to a positive number.
# Examples
ln(1) -- returns zero
ln(0.15) -- returns -1.89712
ln(10) -- returns 2.302585
# Description
Use the ln function to obtain a base e logarithm.
The transcendental number e appears in many mathematical formulas.
To find the logarithm of a number in any base, use the following function:
function logarithm theBase,theNumber return ln(theNumber)/ln(theBase) end logarithm
If a math operation on finite inputs produces a non-finite output, an execution error is thrown. See math operations for more information.
# Tags
math,
# See
- **control structure:** function - **glossary:** return, math operation - **function:** ln1, exp