[][src]Enum simple_soft_float::ExceptionHandlingMode

#[repr(u8)]
pub enum ExceptionHandlingMode {
    IgnoreExactUnderflow,
    SignalExactUnderflow,
}

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

Use the default behavior of ignoring exact underflow.

SignalExactUnderflow

Signal the UNDERFLOW exception even if the results are exact.

Trait Implementations

impl Clone for ExceptionHandlingMode[src]

impl Copy for ExceptionHandlingMode[src]

impl Debug for ExceptionHandlingMode[src]

impl Default for ExceptionHandlingMode[src]

impl Eq for ExceptionHandlingMode[src]

impl Hash for ExceptionHandlingMode[src]

impl PartialEq<ExceptionHandlingMode> for ExceptionHandlingMode[src]

impl StructuralEq for ExceptionHandlingMode[src]

impl StructuralPartialEq for ExceptionHandlingMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.