All Products
Search
Document Center

LN

Last Updated: Jun 18, 2021

The LN function returns the logarithm of numeric_expression to the base of e. e is a mathematical constant and is equal to 2.71828183....

Syntax

LN (numeric_expression)

Parameters

Parameter

Description

numeric_expression

The expression of the exact numeric data types or the approximate numeric data types: NUMBER, FLOAT, BINARY_FLOAT, and BINARY_DOUBLE.

Return type

When the data type of the parameter is BINARY_FLOAT, the return type is BINARY_DOUBLE. In other cases, the return type is the same as the data type of the numeric_expression parameter.

Examples

This example shows the result of calculating the logarithm of 4 to the base of e.

Execute the following statement:

SELECT LN(4) "Natural log of 4" FROM DUAL;

The following query result is returned:

+------------------------------------------+
| Natural log of 4                         |
+------------------------------------------+
| 1.38629436111989061883446424291635313615 |
+------------------------------------------+