User Guide

206 64-Bit Media Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
Single-Precision Format. The single-precision floating-point format supported by 64-bit media
instructions is the same format as the normalized IEEE 754 single-precision format. This format
includes a sign bit, an 8-bit biased exponent, and a 23-bit significand with one hidden integer bit for a
total of 24 bits in the significand. The hidden integer bit is assumed t o have a value of 1, and the
significand field is also the fraction. The bias of the exponent is 127. However, the 3DNow! format
does not support other aspects of the IEEE 754 standard, such as multiple rounding modes,
representation of numbers other than normalized numbers, and floating-point exceptions.
Range of Representable Values and Saturation. Table 5-3 shows the range of representable
values for 64-bit media floating-point data. Table 5-4 shows the exponent ranges. The largest
representable positive normal number has an exponent of FEh and a significand of 7 FFFFFh, with a
numerical value of 2
127
*(2–2
–23
). The smallest representable negative normal number h as an
exponent of 01h and a significand of 000000h, with a numerical value of 2
–126
.
Results that, after rounding, overflow above the maximum-representable positive or negative number
are saturated (limited or clamped) at the maximum positive or negative number. Results that underflow
below the minimum-representable positive or negative number are treated as zero.
Floating-Point Rounding. In contrast to the IEEE standard, which requires four rounding modes, the
64-bit media floating-point instructions support only one rounding mode, depending on the
instruction. All such instructions use round-to-nearest, except certain floating-point-to-integer
conversion instructions (“Data Conversion” on page 224) which use round-to-zero.
No Support for Infinities, NaNs, and Denormals. 64-bit media floating-point instructions support
only normalized numbers. They do not support infinity, NaN, and denormalized number
representations. Operations on such numbers produce undefined results, and no exceptions are
Table 5-3. Range of Values in 64-Bit Media Floating-Point Data Types
Data-Type Interpretation Doubleword Quadword
Floating-point
Base-2 (exact) 2
–126
to 2
127
*(2–2
–23
)
Two single-precision floating-
point doublewords
Base-10 (approx.) 1.17 * 10
–38
to +3.40 * 10
38
Table 5-4. 64-Bit Floating-Point Exponent Ranges
Biased Exponent Description
FFh Unsupported
1
00h Zero
00h<x<FFh Normal
01h 2
(1–127)
lowest possible exponent
FEh 2
(254–127)
largest possible exponent
Note:
1. Unsupported numbers can be used as source operands but produce undefined
results.