Struct std::num::diy_float::Fp
[−]
[src]
pub struct Fp { pub f: u64, pub e: i16, }
Unstable (
core_private_diy_float
): internal routines only exposed for testing
A custom 64-bit floating point type, representing f * 2^e
.
Fields
f | Unstable ( core_private_diy_float ): internal routines only exposed for testing The integer mantissa. |
e | Unstable ( core_private_diy_float ): internal routines only exposed for testing The exponent in base 2. |
Methods
impl Fp
fn mul(&self, other: &Fp) -> Fp
Unstable (
core_private_diy_float
): internal routines only exposed for testing
Returns a correctly rounded product of itself and other
.
fn normalize(&self) -> Fp
Unstable (
core_private_diy_float
): internal routines only exposed for testing
Normalizes itself so that the resulting mantissa is at least 2^63
.
fn normalize_to(&self, e: i16) -> Fp
Unstable (
core_private_diy_float
): internal routines only exposed for testing
Normalizes itself to have the shared exponent. It can only decrease the exponent (and thus increase the mantissa).