pub enum NonfiniteBehavior {
IEEE754,
NanOnly,
}
Expand description
How the nonfinite values Inf and NaN are represented.
Variants§
IEEE754
Represents standard IEEE 754 behavior. A value is nonfinite if the exponent field is all 1s. In such cases, a value is Inf if the significand bits are all zero, and NaN otherwise
NanOnly
Only the Float8E5M2 has this behavior. There is no Inf representation. A value is NaN if the exponent field and the mantissa field are all 1s. This behavior matches the FP8 E4M3 type described in https://arxiv.org/abs/2209.05433. We treat both signed and unsigned NaNs as non-signalling, although the paper does not state whether the NaN values are signalling or not.
Trait Implementations§
Source§impl Clone for NonfiniteBehavior
impl Clone for NonfiniteBehavior
Source§fn clone(&self) -> NonfiniteBehavior
fn clone(&self) -> NonfiniteBehavior
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl PartialEq for NonfiniteBehavior
impl PartialEq for NonfiniteBehavior
impl Copy for NonfiniteBehavior
impl Eq for NonfiniteBehavior
impl StructuralPartialEq for NonfiniteBehavior
Auto Trait Implementations§
impl Freeze for NonfiniteBehavior
impl RefUnwindSafe for NonfiniteBehavior
impl Send for NonfiniteBehavior
impl Sync for NonfiniteBehavior
impl Unpin for NonfiniteBehavior
impl UnwindSafe for NonfiniteBehavior
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