The compiled code contains a set of floating-point exceptions required for compatibility with the IEEE numeric floating-point standard. The following floating-point exceptions are supported during numeric processing:
Denormal |
One of the floating-point operands has an absolute value that is too small to represent with full precision in the significand. |
Zero Divide |
The dividend is finite and the divisor is zero, but the correct answer has infinite magnitude. |
Overflow |
The resulting floating-point number is too large to represent. |
Underflow |
The resulting floating-point number (which is very close to zero) has an absolute value that is too small to represent even if a loss of precision is permitted in the significand (gradual underflow). |
Inexact (Precision) |
The resulting number is not represented exactly due to rounding or gradual underflow. |
Invalid operation |
Covers cases not covered by other exceptions. An invalid operation produces a quiet NaN (Not-a-Number). |
The denormal exception occurs if one or more of the operands is a denormal number. This exception is never regarded as an error.
A divide-by-zero exception occurs for a floating-point division operation if the divisor is zero and the dividend is finite and non-zero. It also occurs for other operations in which the operands are finite and the correct answer is infinite.
When the divide by zero exception is masked, the result is +/-infinity. The following specific cases cause a zero-divide exception:
LOG(0.0)
LOG10(0.0)
0.0**x, where x is a negative number
For the value of the flags, refer to the ieee_flags () function in your library manual and PentiumŪ Processor Family Developer's Manual, Volumes 1, 2, and 3.
An overflow exception occurs if the rounded result of a floating-point operation contains an exponent larger than the numeric processing unit can represent. A calculation with an infinite input number is not sufficient to cause an exception.
When the overflow exception is masked, the calculated result is +/-infinity or the +/-largest representable normal number depending on rounding mode. When the exception is not masked, a result with an accurate significand and a wrapped exponent is available to an exception handler.
The underflow exception occurs if the rounded result has an exponent that is too small to be represented using the floating-point format of the result.
If the underflow exception is masked, the result is represented by the smallest normal number, a denormal number, or zero. When the exception is not masked, a result with an accurate significand and a wrapped exponent is available to an exception handler
The inexact exception occurs if the rounded result of an operation is not equal to the unrounded result.
It is important that the inexact exception remain masked at all times because many of the numeric library procedures return with an undefined inexact exception flag. If the inexact exception is masked, no special action is performed. When this exception is not masked, the rounded result is available to an exception handler.