Vol. 1 4-21
DATA TYPES
When a numeric-overflow exception occurs and the exception is masked, the processor sets the OE flag and
returns one of the values shown in Table 4-10, according to the current rounding mode. See Section 4.8.4,
“Rounding.”
When numeric overflow occurs and the numeric-overflow exception is not masked, the OE flag is set, a software
exception handler is invoked, and the source and destination operands either remain unchanged or a biased result
is stored in the destination operand (depending whether the overflow exception was generated during an
SSE/SSE2/SSE3 floating-point operation or an x87 FPU operation).
See the following sections for information regarding the numeric overflow exception when detected while executing
x87 FPU instructions or while executing SSE/SSE2/SSE3 instructions:
•
x87 FPU; Section 8.5.4, “Numeric Overflow Exception (#O)”
•
SIMD floating-point exceptions; Section 11.5.2.4, “Numeric Overflow Exception (#O)”
4.9.1.5
Numeric Underflow Exception (#U)
The processor detects a potential floating-point numeric underflow condition whenever the result of rounding with
unbounded exponent (taking into account precision control for x87) is non-zero and tiny; that is, non-zero and less
than the smallest possible normalized, finite value that will fit into the destination operand. Table 4-11 shows the
threshold range for numeric underflow for each of the floating-point formats (assuming normalized results);
underflow occurs when a rounded result falls strictly within the threshold range. The ability to detect and handle
underflow is provided to prevent a very small result from propagating through a computation and causing another
exception (such as overflow during division) to be generated at a later time. Results which trigger underflow are
also potentially less accurate.
Table 4-9. Numeric Overflow Thresholds
Floating-Point Format
Overflow Thresholds
Single Precision
| x | ≥ 1.0 ∗ 2
128
Double Precision
| x | ≥ 1.0 ∗ 2
1024
Double Extended Precision
| x | ≥ 1.0 ∗ 2
16384
Table 4-10. Masked Responses to Numeric Overflow
Rounding Mode
Sign of True Result
Result
To nearest
+
+∞
–
–∞
Toward –∞
+
Largest finite positive number
–
–∞
Toward +∞
+
+∞
–
Largest finite negative number
Toward zero
+
Largest finite positive number
–
Largest finite negative number
Table 4-11. Numeric Underflow (Normalized) Thresholds
Floating-Point Format
Underflow Thresholds*
Single Precision
| x | < 1.0 ∗ 2
−126
Double Precision
| x | < 1.0 ∗ 2
−1022
Double Extended Precision
| x | < 1.0 ∗ 2
−16382
* Where ‘x’ is the result rounded to destination precision with an unbounded exponent range.