pub fn frexp(value: f64) -> Result<(f64, i32), NotImplementedError>
Expand description
Returns a tuple array containing the normalized fraction (a Float) and exponent (an Integer) of the given value.
§Examples
use spinoso_math as math;
let (fraction, exponent) = math::frexp(1234.0)?;
let float = math::ldexp(fraction, exponent)?;
assert_eq!(float, 1234.0);
§Errors
Because spinoso-math
was built with the full
feature, this function will
always succeed and return the normalized fraction and exponent of the given
value.