Term: LN
Definition:
The Oracle PL/SQL LN function is used to get the natural logarithm (to the base e) of a number. It returns number output with numeric inputs and BINARY_DOUBLE with inputs of type BINARY_FLOAT.
Example Syntax:
LN(n)
n may be any legitimate numeric value or any datatype that can be implicitly converted to a numeric value. The LN function will return a value that is the same datatype as the argument provided unless the argument is a BINARY_FLOAT. If the argument is a BINARY_FLOAT then the LN function will return a BINARY_DOUBLE.
Example Usage:
SELECT LN(10) as res FROM DUAL;
RES
-------------------
2.30258509
SELECT LN(20) as res FROM DUAL;
RES
-------------------
2.99573227
Related Links: