Skip to main content

Module power_of_10

Module power_of_10 

Source
Expand description

An implementation of PowerOf2 with a Float exponent, computing $2^x$ for Floats.

Functionsยง

primitive_float_power_of_10
Computes $10^x$, where $x$ is a primitive float, returning the result as a primitive float of the same type. Using this function is more accurate than using x.exp2() or the exp2 function provided by libm.
primitive_float_power_of_10_rational
Computes $10^x$, where $x$ is a Rational, returning the result as a primitive float.