ln()

Computes the natural logarithm of x

Arguments & returns

ln(x)

Scalar
Overload link x Returns
#01 DOUBLE DOUBLE

Example

ln example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

In other engines

Apache Hivelog()

LOG(10)
In Haybarn
LN(10)

SQLGlot example ↗

Used in larger rewrites 1

These examples use ln as one part of a larger SQL translation.

Snowflake

NORMAL(10.5, 2.5, RANDOM())
In Haybarn
10.5 + (2.5 * SQRT(-2 * LN(GREATEST(RANDOM(), 1e-10))) * COS(2 * PI() * RANDOM()))

SQLGlot example ↗