Floating-Point Numbers II
Arithmetic Overflow: Some real numbers are too big to represent in a given number of bits of storage:
Arithmetic Underflow: Some real numbers are too small to represent using a fixed number of bits:
Numbers nearer to zero are closer together than numbers with larger exponents:
- because the mantissa multiplies the exponent; successive numbers in the mantissa multiply the larger exponents, and the numbers space farther
Cancellation Error: Adding a relatively small number to a large one may not change the large one if the difference in magnitude is greater than the precision:
- e.g. 1.0E30 + 1.0E1 = 1.0E30
- the number with the smaller exponent has no effect if the magnitude of the two numbers differs by more than the number of digits of precision
- the mantissa may not have enough precision to reflect the addition of such a relatively small number