pub struct Status(u8);
Expand description
IEEE 754 exception status flags.
Tuple Fields§
§0: u8
Implementations§
Source§impl Status
impl Status
Sourcepub const INVALID: Self
pub const INVALID: Self
No definable result.
Includes:
- Any ops on sNaN, with a few exceptions.
0 * inf
,inf * 0
.fma(0, inf, c)
orfma(inf, 0, c)
, possibly excludingc = qNaN
.+inf + -inf
and similar (includes subtraction and fma).0.0 / 0.0
,inf / inf
remainder(x, y)
ify == 0.0
orx == inf
, and neither is NaN.sqrt(x)
withx < 0.0
.
Sourcepub const DIVIDE_BY_ZERO: Self
pub const DIVIDE_BY_ZERO: Self
Division by zero.
The default result for division is +/-inf based on operand sign. For logB
, the default
result is -inf.
x / y
when x != 0.0
and y == 0.0
,
Sourcepub const OVERFLOW: Self
pub const OVERFLOW: Self
The result exceeds the maximum finite value.
The default result depends on rounding mode. Nearest*
rounds to +/- infinity, sign based
on the intermediate result. Zero
rounds to the signed maximum finite. Positive
and
Negative
round to signed maximum finite in one direction, signed infinity in the other.
Sourcepub const INEXACT: Self
pub const INEXACT: Self
The finite-precision result does not match that of infinite precision, and the reason is not represented by one of the other flags.
pub fn set_underflow(&mut self, val: bool)
pub fn set_inexact(&mut self, val: bool)
fn set_flag(&mut self, val: bool, mask: Self)
pub(crate) const fn with(self, rhs: Self) -> Self
Trait Implementations§
impl Copy for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
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