LOG2 Function

Returns the base-2 logarithm of a numeric value expression.

Category: Mathematical
Returned data type: DOUBLE

Syntax

LOG2(expression)

Arguments

expression

specifies any valid SQL expression that evaluates to a numeric value.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

Example

The following statements illustrate the LOG2 function:
Statements
Results
select log2(8.0);
3
select log2(4);
2

See Also