Skip to main content

Categories: Math

LN

Returns the natural logarithm (base e) of the input. Returns NULL if the input is NULL. Equivalent to LOG with a single argument.

Syntax​

LN(numeric_expression numeric) → double​

  • numeric_expression: A number greater than 0.

Examples

LN example
SELECT LN(0), LN(.1525), LN(1), LN(5.35), LN(5269853105789632584), LN(-1)
-- null, -1.8805906829346708, 0.0, 1.6770965609079151, 43.10853416239341, null
Calculate the natural logarithm of 100
SELECT LN(100)
-- 4.605170185988092
Return NULL for a NULL input
SELECT LN(NULL)
-- null