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