Skip to main content

Module power_of_2_of_float

Module power_of_2_of_float 

Source

Functionsยง

primitive_float_power_of_2
Computes $2^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_2_rational
Computes $2^x$, where $x$ is a Rational, returning the result as a primitive float.