pub struct Uf16E6M10(/* private fields */);Expand description
A 16-bit unsigned float with 6 exponent bits and 10 mantissa bits.
Implementations§
Source§impl Uf16E6M10
impl Uf16E6M10
pub const EXPONENT_BITS: u32 = 6
pub const MANTISSA_BITS: u32 = 10
pub const EXPONENT_BIAS: i32 = 31
pub const EXPONENT_MASK: u16 = 0xfc00
pub const MANTISSA_MASK: u16 = 0x03ff
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: u16) -> Self
pub const fn to_bits(self) -> u16
pub fn from_f32(value: f32) -> Self
pub fn to_f32(self) -> f32
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_f16(value: f16) -> Self
pub fn to_f16(self) -> f16
pub const fn exponent(self) -> u16
pub const fn mantissa(self) -> u16
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 Uf16E6M10
impl Ord for Uf16E6M10
Source§impl PartialOrd for Uf16E6M10
impl PartialOrd for Uf16E6M10
impl Copy for Uf16E6M10
impl Eq for Uf16E6M10
impl StructuralPartialEq for Uf16E6M10
Auto Trait Implementations§
impl Freeze for Uf16E6M10
impl RefUnwindSafe for Uf16E6M10
impl Send for Uf16E6M10
impl Sync for Uf16E6M10
impl Unpin for Uf16E6M10
impl UnsafeUnpin for Uf16E6M10
impl UnwindSafe for Uf16E6M10
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