Expand description
LogBasePowerOf2 and
LogBasePowerOf2Assign,
traits for computing $\log_{2^k} x$ for Floats.
Functionsยง
- primitive_
float_ log_ base_ power_ of_ 2 - Computes $\log_{2^k} x$, the base-$2^k$ logarithm of a primitive float, where the base is $2^k$
for some nonzero integer $k$. The exponent $k$ is
pow, which may be negative. Using this function is more accurate than computing the logarithm using the standard library, whoselog2is not always correctly rounded. - primitive_
float_ log_ base_ power_ of_ 2_ rational - Computes $\log_{2^k} x$, the base-$2^k$ logarithm of a
Rational, where the base is $2^k$ for some nonzero integer $k$, returning a primitive float result. The exponent $k$ ispow, which may be negative.