pub struct F40(/* private fields */);Expand description
A bit-level representation of a 40-bit floating-point number.
The bits are laid out as follows:
- Sign bit: 1 bit
- Exponent width: 8 bits
- Significand precision: 32 bits (31 explicitly stored)
MSB ... LSB
┌─┬╴╴┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬╴╴╴┬─┐
└─┴╴╴┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴╴╴╴┴─┘
├╴╴┘ │ ├─────────────┘ ├───────────────────────────────────────╴╴╴─┘
│ │ │ └ Significand (31 bits)
│ │ └ Exponent (8 bits)
│ └ Sign (1 bit)
└ Padding (24 bits)Trait Implementations§
Source§impl FpClassify for F40
impl FpClassify for F40
Source§impl FpFromBeBytes for F40
impl FpFromBeBytes for F40
Source§impl FpRepr for F40
impl FpRepr for F40
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 = 40u32
const SIGN_BITS: u32 = 1u32
const EXPONENT_BITS: u32 = 8u32
const SIGNIFICAND_BITS: u32 = 31u32
const EXPONENT_MAX: Self::Bits = {transmute(0x00000000000000ff): <floats::F40 as repr::FpRepr>::Bits}
const EXPONENT_BIAS: Self::Bits = {transmute(0x000000000000007f): <floats::F40 as repr::FpRepr>::Bits}
const SIGN_MASK: Self::Bits = {transmute(0x0000008000000000): <floats::F40 as repr::FpRepr>::Bits}
const EXPONENT_MASK: Self::Bits = {transmute(0x0000007f80000000): <floats::F40 as repr::FpRepr>::Bits}
const SIGNIFICAND_MASK: Self::Bits = {transmute(0x000000007fffffff): <floats::F40 as repr::FpRepr>::Bits}
const IMPLICIT_BIT: Self::Bits = {transmute(0x0000000080000000): <floats::F40 as repr::FpRepr>::Bits}
type Bits = u64
Source§impl FpToBeBytes for F40
impl FpToBeBytes for F40
Source§impl PartialOrd for F40
impl PartialOrd for F40
impl Copy for F40
Auto Trait Implementations§
impl Freeze for F40
impl RefUnwindSafe for F40
impl Send for F40
impl Sync for F40
impl Unpin for F40
impl UnwindSafe for F40
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