log
Description
Syntax:
DOUBLE log(DOUBLE b, DOUBLE x)
This function returns the logarithm of x
to the base of b
.
Example
mysql> select log(5,1);
+---------------+
| log(5.0, 1.0) |
+---------------+
| 0 |
+---------------+
mysql> select log(3,20);
+--------------------+
| log(3.0, 20.0) |
+--------------------+
| 2.7268330278608417 |
+--------------------+
mysql> select log(2,65536);
+-------------------+
| log(2.0, 65536.0) |
+-------------------+
| 16 |
+-------------------+
Keywords
LOG