Function spinoso_math::frexp[][src]

pub fn frexp(value: f64) -> Result<(f64, i32), NotImplementedError>

Returns a tuple array containing the normalized fraction (a Float) and exponent (an Integer) of the given value.


use spinoso_math as math;
let (fraction, exponent) = math::frexp(1234.0)?;
let float = math::ldexp(fraction, exponent)?;
assert_eq!(float, 1234.0);


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.