User Guide

128-Bit Media and Scientific Programming 181
24592—Rev. 3.15—November 2009 AMD64 Technology
Denormalized-Operand Exception (DE). The DE exception occurs when one of the source
operands of an instruction is in denormalized form, as described in “Denormalized (Tiny) Numbers”
on page 128.
Zero-Divide Exception (ZE). The ZE exception occurs when and instruction attempts to divide zero
into a non-zero finite dividend.
Overflow Exception (OE). The OE exception occurs when the value of a rounded floating-point
result is larger than the largest representable normalized positive or negative floating-point number in
the destination format. Specifically:
OE = Result
round
> Max
normal
An overflow can occur through computation or through conversion of higher-precision numbers to
lower-precision numbers.
Underflow Exception (UE). The UE exception occurs when the value of a rounded, non-zero
floating-point result is too small to be represented as a normalized positive or negative floating-point
number in the destination format. Such a result is called a tiny number, associated with the “Precision
Exception (PE)” described immediately below.
If UE exceptions are masked by the underflow mask (UM) bit, a UE exception occurs only if the
denormalized form of the rounded result is imprecise. Specifically:
UE = ((UM=0 and (Result
round
< Min
normal
)or
((UM=1 and (Result
round, denormal
) != Result
infinite
)
Underflows can occur, for example, by taking the reciprocal of the largest representable number, or by
converting small numbers in double-precision format to a single-precision format, or simply through
repeated division. The flush-to-zero (FZ) bit in the MXCSR offers additional control of underflows
that are masked. See “MXCSR Register” on page 117 for details.
Precision Exception (PE). The PE exception, also called the inexact-result exception, occurs when a
rounded floating-point result differs from the infinitely precise result and thus cannot be represented
precisely in the destination format. This exception is caused by—among other things—rounding of
underflow or overflow results according to the rounding control (RC) field in the MXCSR, as
described in “Floating-Point Rounding” on page 132.
If an overflow or underflow occurs and the OE or UE exceptions are masked by the overflow mask
(OM) or underflow mask (UM) bit, a PE exception occurs only if the rounded result (for OE) or the
denormalized form of the rounded result (for UE) is imprecise. Specifically:
PE = ((Result
round, denormal
or Result
round
) != Result
infinite
)or
(OM=1 and (Result
round
> Max
normal
)) or
(UM=1 and (Result
round, denormal
< Min
normal
))
Software that does not require exact results normally masks this exception.