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