1Learning Outcomes¶
Understand how the IEEE 754 standard represents zero, infinity, and NaNs
Understand when floating point numbers trigger overflow or overflow
Understand how denormalized numbers implement “gradual” underflow
Convert denormalized numbers into their decimal counterpart
🎥 Lecture Video (overflow and underflow)
Overflow and Underflow, 6:54 - 8:40
🎥 Lecture Video (everything else)
Normalized numbers are only a fraction (heh) of floating point representations. For single-precision (32-bit), IEEE defines the following numbers based on the exponent field (here, the “biased exponent”):
Table 1:Exponent field values for IEEE 754 single-precision.
| Biased Exponent | Significand field | Description |
|---|---|---|
0 (0000000) | all zeros | |
0 (0000000) | nonzero | Denormalized numbers |
| 1 – 254 | anything | Normalized floating point (mantissa has implicit leading 1) |
255 (1111111) | all zeros | |
255 (1111111) | nonzero | NaNs |
In this section, we will motivate why these “special numbers” exist by considering the pitfalls of overflow and underflow. Then, we’ll define each of the special numbers.