User Guide
x87 Floating-Point Programming 255
24592—Rev. 3.15—November 2009 AMD64 Technology
Denormalization may correct the exponent by placing leading zeros in the significand. This may cause
a loss of precision, because the number of significant bits in the fraction is reduced by the leading
zeros. In the single-precision floating-point format, for example, normalized numbers have biased
exponents ranging from 1 to 254 (the unbiased exponent range is from –126 to +127). A true result
with an exponent of, say, –130, undergoes denormalization by right-shifting the significand by the
difference between the normalized exponent and the minimum exponent, as shown in Table 6-6.
Pseudo-Denormalized Numbers. Pseudo-denormalized numbers are positive or negative numbers
in which the integer bit is 1, the biased exponent is 0, and the fraction is any value. The processor
accepts pseudo-denormal source operands but it does not produce pseudo-denormal results. When a
pseudo-denormal number is used as a source operand, the processor treats the arithmetic value of its
biased exponent as 1 rather than 0, and the processor generates a denormalized-operand exception
(DE).
Zero. The floating-point zero is a finite, positive or negative number in which the integer bit is 0, the
biased exponent is 0, and the fraction is 0. The sign of a zero result depends on the operation being
performed and the selected rounding mode. It may indicate the direction from which an underflow
occurred, or it may reflect the result of a division by +∞ or –∞.
Infinity. Infinity is a positive or negative number, +∞ and –∞, in which the integer bit is 1, the biased
exponent is maximum, and the fraction is 0. The infinities are the maximum numbers that can be
represented in floating-point format. Negative infinity is less than any finite number and positive
infinity is greater than any finite number (i.e., the affine sense).
An infinite result is produced when a non-zero, non-infinite number is divided by 0 or multiplied by
infinity, or when infinity is added to infinity or to 0. Arithmetic on infinities is exact. For example,
adding any floating-point number to +∞ gives a result of +∞. Arithmetic comparisons work correctly
on infinities. Exceptions occur only when the use of an infinity as a source operand constitutes an
invalid operation.
Not a Number (NaN). NaNs are non-numbers, lying outside the range of representable floating-point
values. The integer bit is 1, the biased exponent is maximum, and the fraction is non-zero. NaNs are of
two types:
• Signaling NaN (SNaN)
• Quiet NaN (QNaN)
A QNaN is a NaN with the most-significant fraction bit set to 1, and an SNaN is a NaN with the most-
significant fraction bit cleared to 0. When the processor encounters an SNaN as a source operand for
an instruction, an invalid-operation exception (IE) occurs and a QNaN is produced as the result, if the
Table 6-6. Example of Denormalization
Significand (base 2) Exponent Result Type
1.0011010000000000
–130 True result
0.0001001101000000
–126 Denormalized result