# Double-Precision Floating Point

The XDR standard defines the encoding for the double-precision
floating-point data type as a *double*.

The length of a double is 64 bits or 8 bytes. Doubles are encoded using the IEEE standard for normalized double-precision floating-point numbers.

```
(-1)**S * 2**(E-Bias) * 1.F
```

Item | Description |
---|---|

S |
Sign of the number. This one-bit field specifies either 0 for positive or 1 for negative. |

E |
Exponent of the number in base 2. This field contains 11 bits. The exponent is biased by 1023. |

F |
Fractional part of the number's mantissa in base 2. This field contains 52 bits. |

See the Double-Precision Floating Point figure (Figure 1).

The most and least significant bytes of a number are 0 and 3. The
most and least significant bits of a double-precision floating-point
number are 0 and 63. The beginning (and most significant) bit offsets
of *S*, *E*, and *F* are 0, 1, and 12, respectively.
These numbers refer to the mathematical positions of the bits but
no*t* to their physical locations, which vary from medium to
medium.

The IEEE specifications should be consulted when encoding signed zero, signed infinity (overflow), and denormalized numbers (underflow). According to IEEE specifications, the NaN (not-a-number) is system-dependent and should not be used externally.