LOG2
Returns the base-2 logarithm of a numeric argument.
Syntax​
LOG2 ( float_expression )
Arguments​
float_expression
Is an expression of type float or of a type that can be implicitly converted to float. Values less than or equal to 0.0 are returned as NULL.
Return Type​
Returns values of type FLOAT64.
Examples​
Examples in this section use the example blockchain.
This example shows the results of using the LOG2
function.
SELECT LOG2(real) FROM example;
Response:
LOG2(real) [FLOAT64]
NULL
NULL
0
1