Floating-Point Exceptions
Six exception conditions can result from the use of floating-point instructions. All of the exceptions are signaled by an arithmetic exception trap. These exceptions include:
- Invalid Operation. An invalid operation exception is signaled if any operand of a floating-point instruction, other than cmpt xx, is nonfinite (cmpt xx operates normally with plus and minus infinity). This trap is always enabled. If this trap occurs, an unpredictable value is stored in the destination register.
- Division by Zero. A division by zero exception is taken if the numerator does not cause an invalid operation trap and the denominator is zero. This trap is always enabled. If this trap occurs, an unpredictable value is stored in the destination register.
- Overflow. An overflow exception is signaled if the rounded result exceeds, in magnitude, the largest finite number of the destination format. This trap is always enabled. If this trap occurs, an unpredictable value is stored in the destination register.
- Underflow. An underflow exception occurs if the rounded result is smaller, in magnitude, than the smallest finite number of the destination format. This trap may be enabled with the v instruction qualifier. If this trap occurs, a true zero is always stored in the destination register.
- Inexact Result. An inexact result exception occurs if the infinitely precise result differs from the rounded result. This trap is disabled by default, and may be enabled. If this trap occurs, the normal rounded result is still stored in the destination register.
- Integer Overflow. An integer overflow exception occurs if the conversion from a floating-point or integer format to an integer format results in a value that is outside of the range of values representable by the destination format. This trap is disabled by default, and may be enabled. If this trap occurs, the true result is truncated to the number of bits in the destination format and stored in the destination register.