pub struct Half { /* private fields */ }Expand description
IEEE 754 half-precision floating-point (binary16)
Layout: 1 sign bit, 5 exponent bits, 10 mantissa bits. Range: ±65504, smallest normal: 6.1×10⁻⁵, precision: ~3 decimal digits.
Implementations§
Source§impl Half
impl Half
Sourcepub const NEG_INFINITY: Self
pub const NEG_INFINITY: Self
Negative infinity
Sourcepub const MIN_POSITIVE: Self
pub const MIN_POSITIVE: Self
Minimum positive normal value
Sourcepub fn is_infinite(self) -> bool
pub fn is_infinite(self) -> bool
Check if infinite
Sourcepub fn is_sign_negative(self) -> bool
pub fn is_sign_negative(self) -> bool
Check if sign bit is set
Trait Implementations§
impl Copy for Half
impl Eq for Half
Source§impl PartialOrd for Half
impl PartialOrd for Half
impl StructuralPartialEq for Half
Auto Trait Implementations§
impl Freeze for Half
impl RefUnwindSafe for Half
impl Send for Half
impl Sync for Half
impl Unpin for Half
impl UnsafeUnpin for Half
impl UnwindSafe for Half
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.