LN
Descriptionβ
Returns the natural logarithm of x
to base e
.
Aliasβ
- DLOG1
Syntaxβ
LN(<x>)
Parametersβ
Parameter | Description |
---|---|
<x> | Antilogarithm should be greater than 0 |
Return valueβ
Return a float-point number. Special cases:
- If x IS NULL, return NULL
Exampleβ
select ln(1);
+-----------------------+
| ln(cast(1 as DOUBLE)) |
+-----------------------+
| 0.0 |
+-----------------------+
select ln(e());
+---------+
| ln(e()) |
+---------+
| 1.0 |
+---------+
select ln(10);
+------------------------+
| ln(cast(10 as DOUBLE)) |
+------------------------+
| 2.302585092994046 |
+------------------------+