next up previous contents
Next: Rounding - up or Up: Computer Representation of Numbers Previous: Precision   Contents

The Set of FP Numbers

The set of all FP numbers consists of


Because of the limited number of digits, the FP numbers are a finite set. For example, in our toy FP system, we have approximately FP numbers altogether.

The FP numbers are not uniformly spread between min and max values; they have a high density near zero, but get sparser as we move away from zero.

25<25 SetFigFontpt@pt xxxxxxsplain


For example, in our FP system, there are 90 points between 1 and 10 (hence, the gap between 2 successive numbers is 0.01). Between 10 and 100 there are again 90 FP numbers, now with a gap of 0.1. The interval 100 to 1000 is ``covered'' by another 90 FP values, the difference between 2 successive ones being 1.0.

In general, if is a normalized FP number, with mantissa , the very next FP number representable is (please give a moment's thought about why this is so). In consequence, the gap between and the next FP number is . The larger the floating point numbers, the larger the gap between them will be (the machine precision is a fixed number, while the exponent increases with the number).

In binary format, similar expressions hold. Namely, the gap between and its successor is .


next up previous contents
Next: Rounding - up or Up: Computer Representation of Numbers Previous: Precision   Contents
Adrian Sandu 2001-08-26