Computer Science I / Limits and Continuity
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
  1. What happens when a tiny value is added to a large one?
  2. 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.

Read the lesson: Limits and Continuity →

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