Intel 64 and IA-32 Architectures Software Developers Manual Volume 1, Basic Architecture
4-30 Vol. 1
DATA TYPES
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 vary small
result from propagating through a computation and causing another exception (such
as overflow during division) to be generated at a later time.
How the processor handles an underflow condition, depends on two related condi-
tions:
• creation of a tiny result
• creation of an inexact result; that is, a result that cannot be represented exactly
in the destination format
Which of these events causes an underflow exception to be reported and how the
processor responds to the exception condition depends on whether the underflow
exception is masked:
• Underflow exception masked — The underflow exception is reported (the UE
flag is set) only when the result is both tiny and inexact. The processor returns a
denormalized result to the destination operand, regardless of inexactness.
• Underflow exception not masked — The underflow exception is reported
when the result is tiny, regardless of inexactness. The processor leaves the
source and destination operands unaltered or stores a biased result in the
designating operand (depending whether the underflow exception was generated
during an SSE/SSE2/SSE3 floating-point operation or an x87 FPU operation) and
invokes a software exception handler.
See the following sections for information regarding the numeric underflow exception
when detected while executing x87 FPU instructions or while executing
SSE/SSE2/SSE3 instructions:
• x87 FPU; Section 8.5.5, “Numeric Underflow Exception (#U)”
• SIMD floating-point exceptions; Section 11.5.2.5, “Numeric Underflow Exception
(#U)”
4.9.1.6 Inexact-Result (Precision) Exception (#P)
The inexact-result exception (also called the precision exception) occurs if the result
of an operation is not exactly representable in the destination format. For example,
the fraction 1/3 cannot be precisely represented in binary floating-point form. This
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.