pub struct F64(/* private fields */);Expand description
A bit-level representation of a 64-bit floating-point number.
The bits are laid out as follows:
- Sign bit: 1 bit
- Exponent width: 11 bits
- Significand precision: 53 bits (52 explicitly stored)
MSB ... LSB
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬╴╴╴┬─┐
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴╴╴╴┴─┘
│ ├─────────────────┘ ├───────────────────────────────────╴╴╴─┘
│ │ └ Significand (53 bits)
│ └ Exponent (11 bits)
└ Sign (1 bit)Trait Implementations§
Source§impl FpClassify for F64
impl FpClassify for F64
Source§impl FpFromBeBytes for F64
impl FpFromBeBytes for F64
Source§impl FpPack for F64
impl FpPack for F64
type Validator = PackedFloatValidator<f64>
fn pack_native(self, validator: &Self::Validator) -> PackedFloat
fn pack_optimal(self, validator: &Self::Validator) -> PackedFloat
Source§impl FpRepr for F64
impl FpRepr for F64
const ZERO: Self
const ONE: Self
const MIN: Self
const MAX: Self
const MIN_POSITIVE: Self
const INFINITY: Self
const NEG_INFINITY: Self
const BITS: u32 = 64u32
const SIGN_BITS: u32 = 1u32
const EXPONENT_BITS: u32 = 11u32
const SIGNIFICAND_BITS: u32 = 52u32
const EXPONENT_MAX: Self::Bits = {transmute(0x00000000000007ff): <floats::F64 as repr::FpRepr>::Bits}
const EXPONENT_BIAS: Self::Bits = {transmute(0x00000000000003ff): <floats::F64 as repr::FpRepr>::Bits}
const SIGN_MASK: Self::Bits = {transmute(0x8000000000000000): <floats::F64 as repr::FpRepr>::Bits}
const EXPONENT_MASK: Self::Bits = {transmute(0x7ff0000000000000): <floats::F64 as repr::FpRepr>::Bits}
const SIGNIFICAND_MASK: Self::Bits = {transmute(0x000fffffffffffff): <floats::F64 as repr::FpRepr>::Bits}
const IMPLICIT_BIT: Self::Bits = {transmute(0x0010000000000000): <floats::F64 as repr::FpRepr>::Bits}
type Bits = u64
Source§impl FpToBeBytes for F64
impl FpToBeBytes for F64
Source§impl PartialOrd for F64
impl PartialOrd for F64
impl Copy for F64
Auto Trait Implementations§
impl Freeze for F64
impl RefUnwindSafe for F64
impl Send for F64
impl Sync for F64
impl Unpin for F64
impl UnwindSafe for F64
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more