Collections:
LN() - Natural Logarithm
How to calculate the natural logarithm of a given number using the LN() function?
✍: FYIcenter.com
LN(X, Y) is a MySQL built-in function that calculates the natural logarithm of a given number. For example:
SELECT LN(2.71828), LN(1), LN(0.367879); -- +-------------------+-------+---------------------+ -- | LN(2.71828) | LN(1) | LN(0.367879) | -- +-------------------+-------+---------------------+ -- | 0.999999327347282 | 0 | -1.0000011992290339 | -- +-------------------+-------+---------------------+
Reference information of the LN() function:
LN(X): val Returns the natural logarithm of X; that is, the base-e logarithm of X. If X is less than or equal to 0.0E0, the function returns NULL. This function is synonymous with LOG(X). The inverse of this function is the EXP() function. Arguments, return value and availability: X: Required. The input value. val: Return value. The natural logarithm of X. Available since MySQL 4.0.
Related MySQL functions:
⇒ LOG() - Logarithm of Y to Base X
⇐ INTERVAL() - Interval Position of Sorted List
2023-11-15, 257🔥, 0💬
Popular Posts:
How To Count Rows with the COUNT(*) Function in SQL Server? If you want to count the number of rows,...
How REAL and FLOAT Literal Values Are Rounded in SQL Server Transact-SQL? By definition, FLOAT(n) sh...
How To Format DATETIME Values to Strings with the CONVERT() Function in SQL Server Transact-SQL? SQL...
How To Use "IF ... ELSE IF ..." Statement Structures in SQL Server Transact-SQL? "IF ... ELSE IF ......
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...