Syntax
LOG2(X)
Purpose
LOG2() returns the logarithm of X to base 2. X is a positive real number of which you want to calculate the logarithm to base 2.
Examples
obclient> SELECT LOG2(65536);
+-------------+
| LOG2(65536) |
+-------------+
| 16 |
+-------------+
1 row in set
obclient> SELECT LOG2(-65536);
+--------------+
| LOG2(-65536) |
+--------------+
| NULL |
+--------------+
1 row in set, 1 warning