| |
| | Floating Point |
 | | Arithmetic with integers is exact, unless the answer is outside the range of integers that can be represented (overflow). |
 | | In contrast, floating point arithmetic is not exact since some number require an infinite number of digits to be represented, e.g., the mathematical constants e and π and 1/3. |
 | | With single precision, when N = 10,000, the sum is accurate to 5 decimal digits, when N = 1,000,000 it is accurate to only 3 decimal digits, when N = 10,000,000 it is accurate to only 2 decimal digits. |
| www.cs.princeton.edu /introcs/91float (6340 words) |
|