An IEEE 754 double precision floating point number is composed of the following three fields:
- 1-bit sign
- 11-bit biased exponent
- 52-bit fraction (a.k.a. mantissa or significand)
The fields are stored in a 64 bit long as defined in the following figure:
Figure 1. IEEE 754 Double Precision Format
The value of a floating point number v in MicroBlaze has the following interpretation:
- If exponent = 2047 and fraction <> 0, then v = NaN, regardless of the sign bit
- If exponent = 2047 and fraction = 0, then v = (-1)sign * ∞
- If 0 < exponent < 2047, then v = (-1)sign * 2( exponent -1023) * (1.fraction)
- If exponent = 0 and fraction <> 0, then v = (-1)sign * 2-1022 * (0.fraction)
- If exponent = 0 and fraction = 0, then v = (-1)sign * 0
For practical purposes only 3 and 5 are useful, while the others all represent either an error or numbers that can no longer be represented with full precision in a 64 bit format.