pub enum Fault {
DivByZero,
Reserved,
Overflow,
Underflow,
}Expand description
VAX floating-point number fault
Internally, none of the arithmetic functions will panic or return an error, but the error state
is recored as the Fault. Depending on how the VaxFloatingPoint type is converted, it
will either return an Error of the appropriate type, or be converted into an appropriate
type.
Once a fault has been set, it prevents further arithmetic operations.
Variants§
DivByZero
Set as the result of a division operation where the denominator is zero.
If converted into a Rust floating-point type, this will be converted into an Infinity value. For
VAX floating-point types, it will be converted to the Reserved value (negative zero).
It will return an Error::DivByZero error for conversions that return a Result.
Reserved
VAX floating point numbers encoded with a negative zero trigger a reserved operand fault.
If converted into a Rust floating-point type, this will be converted into a NaN value. For
VAX floating-point types, it will be converted to the Reserved value (negative zero).
It will return an Error::Reserved error for conversions that return a Result.
Overflow
Set as a result of overflowing the VaxFloatingPoint exponent.
If converted into a Rust floating-point type, this will be converted into a NaN value. For
VAX floating-point types, it will be converted to the Reserved value (negative zero).
It will return an Error::Overflow(i32::MAX) error for conversions that
return a Result.
Underflow
Set as a result of overflowing the VaxFloatingPoint exponent.
If converted into a Rust floating-point type, this will be converted into a NaN value. For
VAX floating-point types, it will be converted to the Reserved value (negative zero).
It will return an Error::Underflow(i32::MIN) error for conversions
that return a Result.