Practice question · Multiple choice
Subtracting two nearly equal numbers is called catastrophic cancellation. Why is it so much worse than other floating-point operations?
Hints
- Take 1.00000001 and 1.00000000, each accurate to 8 significant figures. How many are left in the difference?
- Ask what happens to the ABSOLUTE error and to the RELATIVE error.
Show the answer
A. Because the leading digits cancel and the errors do not
Why
The absolute error is unchanged and the result is tiny, so the relative error explodes, accurate inputs give an answer that is mostly noise. It is why the quadratic formula is rearranged when b² ≫ 4ac, and why numerical analysts rewrite algebra that looks perfectly fine on paper.
Practise Numerical Errors and Stability
The app has 5 more questions on this lesson, and keeps your place in the course. Mathematics I is free to start.
More questions on Numerical Errors and Stability
- Select every statement about cancellation and stability that is TRUE.
- Order the steps of curing a formula that loses accuracy to cancellation.
- Sort each source of error by its kind.
- Truncation error shrinks as the step size h decreases, while round-off error grows. Why does that leave an…
- Complete the definition of numerical stability.