pub struct Uf32E8M24(/* private fields */);Expand description
A 32-bit unsigned float with 8 exponent bits and 24 mantissa bits.
Implementations§
Source§impl Uf32E8M24
impl Uf32E8M24
pub const EXPONENT_BITS: u32 = 8
pub const MANTISSA_BITS: u32 = 24
pub const EXPONENT_BIAS: i32 = 127
pub const EXPONENT_MASK: u32 = 0xff00_0000
pub const MANTISSA_MASK: u32 = 0x00ff_ffff
pub const ZERO: Self
pub const ONE: Self
pub const INFINITY: Self
pub const NAN: Self
pub const MAX: Self
pub const MIN_POSITIVE: Self
pub const MIN_NORMAL: Self
pub const fn from_bits(bits: u32) -> Self
pub const fn to_bits(self) -> u32
pub fn from_f64(value: f64) -> Self
pub fn to_f64(self) -> f64
pub fn try_from_f64(value: f64) -> Result<Self, ConversionError>
pub fn from_f32(value: f32) -> Self
pub fn to_f32(self) -> f32
pub fn from_f16(value: f16) -> Self
pub fn to_f16(self) -> f16
pub const fn exponent(self) -> u32
pub const fn mantissa(self) -> u32
pub const fn is_zero(self) -> bool
pub const fn is_nan(self) -> bool
pub const fn is_infinite(self) -> bool
pub const fn is_finite(self) -> bool
pub const fn is_subnormal(self) -> bool
Trait Implementations§
Source§impl Ord for Uf32E8M24
impl Ord for Uf32E8M24
Source§impl PartialOrd for Uf32E8M24
impl PartialOrd for Uf32E8M24
impl Copy for Uf32E8M24
impl Eq for Uf32E8M24
impl StructuralPartialEq for Uf32E8M24
Auto Trait Implementations§
impl Freeze for Uf32E8M24
impl RefUnwindSafe for Uf32E8M24
impl Send for Uf32E8M24
impl Sync for Uf32E8M24
impl Unpin for Uf32E8M24
impl UnsafeUnpin for Uf32E8M24
impl UnwindSafe for Uf32E8M24
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