next up previous

2.6 Data Representations     continued...

The next important point is that there is a gap between , the smallest positive number, and 0.0. A round-off error in a calculation that should produce a small non-zero value but instead results in 0.0 is called an underflow. One of the strengths of the IEEE standard is that it allows a special denormalized form for very small numbers in order to stave off underflows as long as possible. This is why the exponent in the largest and smallest positive numbers are not symmetrical. Without denormalized numbers, the smallest positive number in the IEEE standard would be around .

Finally, and perhaps most important, is the fact that the numbers that can be represented are not distributed evenly throughout the range. Representable numbers are very dense close to 0.0, but then grow steadily further apart as they increase in magnitude. The dark regions in Figure 2 correspond to parts of the number line where representable numbers are packed close together. It is easy to see why the distribution is not even by asking what two numbers are represented by two successive values of the mantissa for any given exponent. To make the calculations easier, suppose we have a 16-bit system with a 7-bit mantissa and 8-bit exponent. No matter what the exponent is, the distance between any two successive values of the mantissa, e.g. between and , will be . For numbers closest to 0.0, the exponent will be a negative number, e.g. -100, and the distance between two successive floating point numbers will be . At the other end of the scale, when exponents are large, the distance between two numbers will be approximately , namely .