4.2 IEEE floating point formats

The IEEE (Institute of Electrical and Electronics Engineers) has established two floating point number formats. A single precision format (float in C) uses 32 bits, while a double precision format (double in C) uses 64 bits.

Counting bits from the least significant digit, table 1 describes the two formats.







Format SignExponentExp. Bias,Mantissa





Single precision 31 23-30 127 0-22
Double precision64 52-62 1023 0-51






Table 1: IEEE floating point formats.

  4.2.1 Special values
  4.2.2 Example 1
  4.2.3 Example 2
  4.2.4 Visualizing floating point representation