Skip to main content

Module log_base

Module log_base 

Source
Expand description

LogBase and LogBaseAssign, traits for computing the base-$b$ logarithm of Floats for an arbitrary integer base $b>1$.

Functionsยง

primitive_float_log_base
Computes $\log_b x$, the base-$b$ logarithm of a primitive float, where $b$ is a u64 greater than 1. Using this function is more accurate than computing the logarithm using the standard library, whose log is not always correctly rounded.
primitive_float_log_base_rational
Computes $\log_b x$, the base-$b$ logarithm of a Rational, where $b$ is a u64 greater than 1, returning a primitive float result.