Skip to main content

LOG

Returns the logarithm of the first expression to the base of the second.

Syntax​

LOG ( float_expression , float_expression ) 

Arguments​

float_expression
Is an expression of type float or of a type that can be implicitly converted to float. Returns NULL if either argument is less than or equal to 0.0.

Return Type​

Returns values of type FLOAT64.

Examples​

Examples in this section use the example blockchain.

The following example calculates the LOG for the specified components.

SELECT LOG(real, 2) FROM example;

Response:

LOG(real, 2) [FLOAT64]
NULL
NULL
0
1