We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lossy_from(f64)
Example for how to extract the mantissa & exponent:
fn raw_mantissa_and_exponent<T: PrimitiveFloat>(x: T) -> (u64, u64) { let bits = x.to_bits(); let mantissa = bits.mod_power_of_2(T::MANTISSA_WIDTH); let exponent: u64 = (bits >> T::MANTISSA_WIDTH).exact_into(); let exponent = exponent.mod_power_of_2(T::EXPONENT_WIDTH); (mantissa, exponent) }
The text was updated successfully, but these errors were encountered:
Actually, need to re-think if this is useful or if we should just provide a decimal! macro
decimal!
Sorry, something went wrong.
No branches or pull requests
Example for how to extract the mantissa & exponent:
The text was updated successfully, but these errors were encountered: