Computer Arithmetic
What is the phenomenon called in which subtracting two nearly equal floating-point numbers greatly reduces the significant digits?
- AAbsorption
- BOverflow
- CCatastrophic cancellation
Show answer and explanation
Answer: C. Catastrophic cancellation
With seven significant digits, for example, 1.234567 − 1.234566 = 0.000001: the top six digits cancel, leaving only one significant digit. Tiny rounding errors in the original numbers become relatively huge in the result. This is catastrophic cancellation, countered by rearranging formulas to avoid subtracting close values. Absorption is a different phenomenon in which the smaller operand's digits are lost when adding numbers of very different magnitude.
- A. Absorption is a different phenomenon in additions of unequal magnitudes.
- B. Overflow is exceeding the representable range.
- C. Correct. Subtracting close numbers loses significant digits.