util: Optimise log2().

This commit is contained in:
Michal Krol 2008-11-12 19:02:41 +01:00
parent f447eea4de
commit 0d8637451b

View file

@ -163,7 +163,8 @@ static INLINE float logf( float f )
static INLINE double log2( double x )
{
return log( x ) / log( 2.0 );
const double invln2 = 1.442695041;
return log( x ) * invln2;
}
#else