
Chapter 4: 128-Bit Media and Scientific Programming
155
24593—Rev. 3.09—September 2003
AMD 64-Bit Technology
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 exception is masked. In general, when the processor
encounters a QNaN as a source operand for an instruction, the
processor does not generate an exception but generates a QNaN
as the result.
The processor never generates an SNaN as a result of a floating-
point operation. When an invalid-operation exception (IE)
occurs due to an SNaN operand, the invalid-operation exception
mask (IM) bit determines the processor’s response, as described
in “SIMD Floating-Point Exception Masking” on page 218.