Skip to main content

Module log_base_rational_base_1_plus_x

Module log_base_rational_base_1_plus_x 

Source
Expand description

LogBaseOf1PlusX and LogBaseOf1PlusXAssign, implemented for a Rational base, for computing $\log_b(1+x)$ of a Float with an arbitrary rational base $b>1$.

Functions§

primitive_float_log_base_rational_base_1_plus_x
Computes $\log_b(1+x)$, the base-$b$ logarithm of one plus a primitive float, where the base $b$ is a Rational greater than 1, returning a primitive float result. 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.