Skip to main content

log2

Discworld driver help

log2

Name

log2() - returns the base 2 logarithm of a number

Synopsis

float log2( float f );
float log2( int f );

Description

Returns the base 2 logarithm of its argument, `f'. `f' must be positive.

By the rules of logarithms, log2( x ) == log( x ) / log( 2 ).

See also

log(), log10(), exp(), pow(), sqrt()