3.7 Doubleprecision Floatingpoint
Connected: An Internet Encyclopedia
3.7 Doubleprecision Floatingpoint
Up:
Connected: An Internet Encyclopedia
Up:
Requests For Comments
Up:
RFC 1832
Up:
3. XDR DATA TYPES
Prev: 3.6 Floatingpoint
Next: 3.8 Quadrupleprecision Floatingpoint
3.7 Doubleprecision Floatingpoint
3.7 Doubleprecision Floatingpoint
The standard defines the encoding for the doubleprecision floating
point data type "double" (64 bits or 8 bytes). The encoding used is
the IEEE standard for normalized doubleprecision floatingpoint
numbers [3]. The standard encodes the following three fields, which
describe the doubleprecision floatingpoint number:
S: The sign of the number. Values 0 and 1 represent positive and
negative, respectively. One bit.
E: The exponent of the number, base 2. 11 bits are devoted to
this field. The exponent is biased by 1023.
F: The fractional part of the number's mantissa, base 2. 52 bits
are devoted to this field.
Therefore, the floatingpoint number is described by:
(1)**S * 2**(EBias) * 1.F
It is declared as follows:
double identifier;
+++++++++
byte 0byte 1byte 2byte 3byte 4byte 5byte 6byte 7
S E  F 
+++++++++
1<11><52 bits>
<64 bits>
DOUBLEPRECISION FLOATINGPOINT
Just as the most and least significant bytes of a number are 0 and 3,
the most and least significant bits of a doubleprecision floating
point number are 0 and 63. The beginning bit (and most significant
bit) offsets of S, E , and F are 0, 1, and 12, respectively. Note
that these numbers refer to the mathematical positions of the bits,
and NOT to their actual physical locations (which vary from medium to
medium).
The IEEE specifications should be consulted concerning the encoding
for signed zero, signed infinity (overflow), and denormalized numbers
(underflow) [3]. According to IEEE specifications, the "NaN" (not a
number) is system dependent and should not be interpreted within XDR
as anything other than "NaN".
Next: 3.8 Quadrupleprecision Floatingpoint
Connected: An Internet Encyclopedia
3.7 Doubleprecision Floatingpoint
