Oracle® Solaris Studio 12.4: Numerical Computation Guide

Exit Print View

Updated: January 2015
 
 

2.2.5 Double-Extended Format (x86)

This floating-point environment's double-extended format conforms to the IEEE definition of double-extended formats. It consists of four fields: a 63-bit fraction f; a 1-bit explicit leading significand bit j; a 15-bit biased exponent e; and a 1-bit sign s. This format is not available as a language type for Oracle Solaris Studio Fortran or for C/C++ for SPARC.

In the family of x86 architectures, these fields are stored contiguously in ten successively addressed 8-bit bytes. However, the UNIX System V Application Binary Interface Intel 386 Processor Supplement (Intel ABI) requires that double-extended parameters and results occupy three consecutively addressed 32-bit words in the stack, with the most significant 16 bits of the highest addressed word being unused, as shown in the following figure.

The lowest addressed 32-bit word contains the least significant 32 bits of the fraction, f[31:0], with bit 0 being the least significant bit of the entire fraction and bit 31 being the most significant of the 32 least significant fraction bits. In the middle addressed 32-bit word, bits 0:30 contain the 31 most significant bits of the fraction, f[62:32], with bit 0 being the least significant of these 31 most significant fraction bits, and bit 30 being the most significant bit of the entire fraction; bit 31 of this middle addressed 32-bit word contains the explicit leading significand bit, j.

In the highest addressed 32-bit word, bits 0:14 contain the 15-bit biased exponent, e, with bit 0 being the least significant bit of the biased exponent and bit 14 being the most significant; and bit 15 contains the sign bit, s. Although the highest order 16 bits of this highest addressed 32-bit word are unused by the family of x86 architectures, their presence is essential for conformity to the Intel ABI, as indicated above.

The following figure numbers the bits as though the three contiguous 32-bit words were one 96-bit word in which bits 0:62 store the 63-bit fraction, f; bit 63 stores the explicit leading significand bit, j; bits 64:78 store the 15-bit biased exponent, e; and bit 79 stores the sign bit, s.

Figure 2-4  Double-Extended Format (x86)

image:Representation of bits in double-extended format for x86 systems.

The values of the bit patterns in the four fields f, j, e and s, determine the value represented by the overall bit pattern.

Table 2–8 shows the correspondence between the hex representations of the four constituent fields and the values represented by the bit patterns. u means the value of the indicated field is irrelevant to the determination of value for the particular bit patterns.

Table 2-8  Values Represented by Bit Patterns (x86)
Double-Extended Bit Pattern (x86)
Value
j = 0, 0 < e <32767
Unsupported
j = 1, 0 < e < 32767
(–1)s × 2e–16383 × 1.f ( normal numbers)
j = 0, e = 0; f ≠ 0
(at least one bit in f is nonzero)
(–1)s × 216382 × 0.f ( subnormal numbers)
j = 1, e = 0
(–1)s × 216382 × 1.f (pseudo-denormal numbers)
j = 0, e = 0, f = 0
(all bits in f are zero)
(–1)s × 0.0 (signed zero)
j = 1; s = 0; e = 32767; f = 0 (all bits in f are zero)
+INF (positive infinity)
j = 1; s = 1; e = 32767; f = 0 (all bits in f are zero)
–INF (negative infinity)
j = 1; s = u; e = 32767; f = .1uuuuu
QNaN (quiet NaNs)
j = 1; s = u; e = 32767; f = .0uuuuu ≠ 0
(at least one of the u in f is nonzero)
SNaN (signaling NaNs)

Notice that bit patterns in double-extended format do nothave an implicit leading significand bit. The leading significand bit is given explicitly as a separate field, j, in the double-extended format. However, when e ≠ 0, any bit pattern with j = 0 is unsupported in the sense that using such a bit pattern as an operand in floating-point operations provokes an invalid operation exception.

The union of the disjoint fields j and f in the double extended format is called the significand. When e < 32767 and j = 1, or when e = 0 and j = 0, the significand is formed by inserting the binary radix point between the leading significand bit, j, and the fraction's most significant bit.

In the x86 double-extended format, a bit pattern whose leading significand bit j is 0 and whose biased exponent field e is also 0 represents a subnormal number, whereas a bit pattern whose leading significand bit j is 1 and whose biased exponent field e is nonzero represents a normal number. Because the leading significand bit is represented explicitly rather than being inferred from the value of the exponent, this format also admits bit patterns whose biased exponent is 0, like the subnormal numbers, but whose leading significand bit is 1. Each such bit pattern actually represents the same value as the corresponding bit pattern whose biased exponent field is 1, i.e., a normal number, so these bit patterns are called pseudo-denormals. Subnormal numbers were called denormalized numbers in IEEE Standard 754-1985. Pseudo-denormals are merely an artifact of the x86 double-extended format's encoding; they are implicitly converted to the corresponding normal numbers when they appear as operands, and they are never generated as results.

Table 2-9  Bit Patterns in Double-Extended Format and Their Values (x86)
Common Name
Bit Pattern (x86)
Decimal Value
+0
0000 00000000 00000000
0.0
–0
8000 00000000 00000000
–0.0
1
3fff 80000000 00000000
1.0
2
4000 80000000 00000000
2.0
max normal
7ffe ffffffff ffffffff
1.18973149535723176505e+4932
min positive normal
0001 80000000 00000000
3.36210314311209350626e–4932
max subnormal
0000 7fffffff ffffffff
3.36210314311209350608e–4932
min positive subnormal
0000 00000000 00000001
3.64519953188247460253e–4951
+∞
7fff 80000000 00000000
+∞
–∞
ffff 80000000 00000000
–∞
quiet NaN with greatest fraction
7fff ffffffff ffffffff
QNaN
quiet NaN with least fraction
7fff c0000000 00000000
QNaN
signaling NaN with greatest fraction
7fff bfffffff ffffffff
SNaN
signaling NaN with least fraction
7fff 80000000 00000001
SNaN

Examples of important bit patterns in the double-extended storage format appear in the preceding table. The bit patterns in the second column appear as one 4-digit hexadecimal number, which is the value of the 16 least significant bits of the highest addressed 32-bit word (recall that the most significant 16 bits of this highest addressed 32-bit word are unused, so their value is not shown), followed by two 8-digit hexadecimal numbers, of which the left one is the value of the middle addressed 32-bit word, and the right one is the value of the lowest addressed 32-bit word. The maximum positive normal number is the largest finite number representable in the x86 double-extended format. The minimum positive subnormal number is the smallest positive number representable in the double-extended format. The minimum positive normal number is often referred to as the underflow threshold. The decimal values for the maximum and minimum normal and subnormal numbers are approximate; they are correct to the number of figures shown.

A NaN (Not a Number) can be represented by any of the many bit patterns that satisfy the definition of NaN. The hex values of the NaNs shown in the preceding table illustrate that the leading (most significant) bit of the fraction field determines whether a NaN is quiet (leading fraction bit = 1) or signaling (leading fraction bit = 0).