log2()

Scalar. Returns the logarithm of a given value to the base 2.

Syntax

log2 ( value )

Parameters

value

An expression that evaluates to a float greater than or equal to 0.

Usage

Returns the logarithm of a given value to the base 2. The function expects a float for its argument, however, an integer will be promoted to a float when the function executes. The function returns a float.

Example

log2 (8.0) returns 3.0.