Add public API and docs #1
|
|
@ -32,6 +32,11 @@ const M_MASK: u8 = M_STORAGE_MAX;
|
|||
const E_MASK: u8 = E_STORAGE_MAX << M_BITS;
|
||||
|
||||
/// 8-bit unsigned binary floating-point type, with [`M_BITS`] mantissa bits and [`E_BITS`] exponent bits.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)]
|
||||
#[repr(transparent)]
|
||||
pub struct F8(u8);
|
||||
|
||||
impl F8 {
|
||||
pub const ZERO: Self = Self(0);
|
||||
pub const ONE: Self = Self::merge(0, E_BIAS);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user