Sha256: 6040bdd49c03f11f8607b2da1703e1b7b5f57ddac9b02322c6958f9c1684496f
Contents?: true
Size: 633 Bytes
Versions: 36
Compression:
Stored size: 633 Bytes
Contents
// FLOAT TYPE #![doc(hidden)] use crate::num::Float; /// Extended precision floating-point type. /// /// Private implementation, exposed only for testing purposes. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct ExtendedFloat { /// Mantissa for the extended-precision float. pub mant: u64, /// Binary exponent for the extended-precision float. pub exp: i32, } /// Converts an `ExtendedFloat` to the closest machine float type. #[inline(always)] pub fn extended_to_float<F: Float>(x: ExtendedFloat) -> F { let mut word = x.mant; word |= (x.exp as u64) << F::MANTISSA_SIZE; F::from_bits(word) }
Version data entries
36 entries across 36 versions & 1 rubygems