Description
The LN( ) function returns the base-e algorithm of X. If X is less than or equal to 0, then NULL is returned.
This function has the form:
SELECT LN(x)
Parameter | Description |
---|---|
x | A number |
Return Value
Returns the base-e algorithm of X. If X is less than or equal to 0, then NULL is returned.
Examples
The following example shows the basic use of this function:
mysql> SELECT LN(2);
-> 0.69314718055995
mysql> SELECT LN(-2);
-> NULL