User Guide
252 x87 Floating-Point Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
• Double-Precision Format—This format includes a 1-bit sign, an 11-bit biased exponent whose
value is 1023, and a 52-bit significand. The integer bit is implied, making a total of 53 bits in the
significand.
• Double-Extended-Precision Format—This format includes a 1-bit sign, a 15-bit biased exponent
whose value is 16,383, and a 64-bit significand, which includes one explicit integer bit.
Table 6-5 shows the range of finite values representable by the three x87 floating-point data types.
For example, in the single-precision format, the largest normal number representable has an exponent
of FEh and a significand of 7FFFFFh, with a numerical value of 2
127
*(2–2
–23
). Results that overflow
above the maximum representable value return either the maximum representable normalized number
(see “Normalized Numbers” on page 254) or infinity, with the sign of the true result, depending on the
rounding mode specified in the rounding control (RC) field of the x87 control word. Results that
underflow below the minimum representable value return either the minimum representable
normalized number or a denormalized number (see “Denormalized (Tiny) Numbers” on page 254),
with the sign of the true result, or a result determined by the x87 exception handler, depending on the
rounding mode, precision mode, and underflow-exception mask (UM) in the x87 control word (see
“Unmasked Responses” on page 288).
Integer Data Type. The integer data types, shown in Figure 6-7 on page 250, include two’s-
complement 16-bit word, 32-bit doubleword, and 64-bit quadword. These data types are used in x87
instructions that convert signed integer operands into floating-point values. The integers can be loaded
from memory into x87 registers and stored from x87 registers into memory. The data types cannot be
moved between x87 registers and other registers.
For details on the format and number-representation of the integer data types, see “Data Types” on
page 36.
Packed-Decimal Data Type. The 80-bit packed-decimal data type, shown in Figure 6-9 on page 253,
represents an 18-digit decimal integer using the binary-coded decimal (BCD) format. Each of the 18
digits is a 4-bit representation of an integer. The 18 digits use a total of 72 bits. The next-higher seven
Table 6-5. Range of Finite Floating-Point Values
Data Type
Range of Finite Values
1
Precision
Base 2 Base 10
Single Precision 2
–126
to 2
127
*(2–2
–23
) 1.17 * 10
–38
to +3.40 * 10
38
24 bits
Double Precision 2
–1022
to 2
1023
*(2–2
–52
) 2.23 * 10
–308
to +1.79 * 10
308
53 bits
Double-Extended
Precision
2
–16382
to 2
16383
*(2–2
–63
) 3.37 * 10
–4932
to +1.18 * 10
4932
64 bits
Note:
1. See “Number Representation” on page 253.