Double Precision - 2024.2 English

MicroBlaze Processor Reference Guide (UG984)

Document ID
UG984
Release Date
2024-11-27
Version
2024.2 English

An IEEE 754 double precision floating point number is composed of the following three fields:

  1. 1-bit sign
  2. 11-bit biased exponent
  3. 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:

  1. If exponent = 2047 and fraction <> 0, then v = NaN, regardless of the sign bit
  2. If exponent = 2047 and fraction = 0, then v = (-1)sign * ∞
  3. If 0 < exponent < 2047, then v = (-1)sign * 2( exponent -1023) * (1.fraction)
  4. If exponent = 0 and fraction <> 0, then v = (-1)sign * 2-1022 * (0.fraction)
  5. 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.