LOG2
log2β
descriptionβ
Syntaxβ
DOUBLE log2(DOUBLE x)
Returns the natural logarithm of x
to base 2
.
exampleβ
mysql> select log2(1);
+-----------+
| log2(1.0) |
+-----------+
| 0 |
+-----------+
mysql> select log2(2);
+-----------+
| log2(2.0) |
+-----------+
| 1 |
+-----------+
mysql> select log2(10);
+--------------------+
| log2(10.0) |
+--------------------+
| 3.3219280948873622 |
+--------------------+
keywordsβ
LOG2