Practice question · True or false
Adding a million small floats into one running total loses accuracy the same numbers would keep if summed pairwise.
Hints
- What happens when a tiny value is added to a large one?
- Error accumulates with every addition in a chain.
Show the answer
True
Why
True. The running total grows large, so each small addend is rounded against it and error accumulates as O(n). Pairwise summation keeps the operands comparable and holds the error to O(log n); Kahan summation carries a compensation term and does better still, at three extra flops per element.
Practise Limits and Continuity
The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.
More questions on Limits and Continuity
- Select every condition that must hold for f to be continuous at the point a.
- Calculus assumes exact real numbers and computers have neither exact reals nor infinitely many of them. Why…
- Order the steps of testing whether f is continuous at the point a.
- For each described point, sort by whether the two-sided limit exists there.