Skip to main content

Module log_base_1_plus_x

Module log_base_1_plus_x 

Source
Expand description

LogBaseOf1PlusX and LogBaseOf1PlusXAssign, traits for computing $\log_b(1+x)$ of Floats for an arbitrary integer base $b>1$.

Functions§

primitive_float_log_base_1_plus_x
Computes $\log_b(1+x)$, the base-$b$ logarithm of one plus 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, both because $1+x$ may not be representable as a primitive float and because the standard library’s log is not always correctly rounded.