#[repr(u8)]pub enum ExceptionHandlingMode {
IgnoreExactUnderflow = 0,
SignalExactUnderflow = 1,
}
Expand description
Select if the underflow exception should be signaled when the result is exact.
In IEEE 754, when exceptions are set to use the default handlers (they are ignored – the default for most programming languages), then underflow exceptions are only signalled when the result is not exact.
When exceptions are instead set to trap, then underflow exceptions are signalled even when the result is exact, to allow the exception handler to emulate flush-to-zero FP semantics.
Since simple-soft-float doesn’t support trapping exceptions, to simulate
trapping exceptions, use SignalExactUnderflow
as the exception
handling mode and check status_flags
after every operation.
Otherwise, use the default value of IgnoreExactUnderflow
.
Variants§
IgnoreExactUnderflow = 0
Use the default behavior of ignoring exact underflow.
SignalExactUnderflow = 1
Signal the UNDERFLOW
exception even if the results are exact.
Trait Implementations§
Source§impl Clone for ExceptionHandlingMode
impl Clone for ExceptionHandlingMode
Source§fn clone(&self) -> ExceptionHandlingMode
fn clone(&self) -> ExceptionHandlingMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more