How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
TwoSum returns the exact rounding error of a floating point sum
Statement
Use a binary floating-point format of precision : its normal positive values are for integers and , with their negatives and zero. Any additional representable values below the normal range must belong to the unbounded binary set of Binary rounding grids, exact subtraction, and ordered TwoSum (as ordinary binary subnormals do). Round each operation to nearest, ties to even, with the no-underflow success rule of Operationwise real and complex floating point arithmetic with rounded square roots and fused multiply-add.
For any representable real inputs for which TwoSum error-free transformation succeeds, its output satisfies exactly in real arithmetic. No ordering or sign condition on the inputs is required; zeros, exact cancellation, and all successful calls at either normal-range boundary are included.
Facts & Assumptions
Given: the binary format, rounding rule, representable inputs, and successful call in the Statement.
TwoSum error-free transformation evaluates six separately rounded operations: , , , , , and .
Operationwise real and complex floating point arithmetic with rounded square roots and fused multiply-add: success requires each exact intermediate to be zero or within the normal range, with finite rounded output.
Binary rounding grids, exact subtraction, and ordered TwoSum supplies monotonicity, oddness, the grid error bound, representable addition errors, exact small cancellation, Sterbenz subtraction, and the ordered transform on .
Proof
Let denote unbounded binary nearest-even rounding from [F3]. On the closed normal range, bounded-format rounding equals : the normal grid is identical, its endpoints are representable, and a point beyond either endpoint cannot beat that endpoint for an exact argument inside the range. Additional subnormal values cannot alter a nearest choice there. At a boundary power of two the normalized even significand gives the same tie choice; zero is exact. All inputs belong to . By [F2], induction over the six operations [F1] therefore identifies the actual successful computation with the same sequence using . It suffices to prove its unbounded identity.
Put . If , the ordered transform [F3] gives and exactly. Consequently , , , and . This includes .
Suppose . If , the small-rounded-sum assertion [F3] makes exact. Then , , and . For the remaining case , apply the ordered transform to : it says and . Oddness therefore gives and exactly. Writing , we have and .
In this remaining case, oddness permits simultaneous sign reversal so that . Since , we have , and monotonicity gives . Thus and the rounding bound yields , since . Also by the addition-error bound. Therefore ; monotonicity, fixing and , gives . Sterbenz [F3] makes exact. Finally is representable by the addition-error assertion [F3], so exactly. Oddness gives the same conclusion before sign reversal.
The branches in steps 2.1, 2.2, and 3.1 cover every magnitude order and sign, and each gives . Step 1.1 transfers this identity to every successful finite-range call, proving . A nonzero subnormal exact intermediate or overflow returns failure under [F2] and is outside the success conclusion; no extra hidden range assumption is used in any successful boundary case.
Remarks
The binary digit hypothesis supplies exactness information absent from the relative-error model alone. Shewchuk's Theorem 7 states the binary result for ; step 3.1 uses the sharper bound on directly to include as well. The theorem retains unrestricted inputs and does not assume that the residual operations are exact: their exactness is proved above.
Depends on
Used by
Dependency tree · two levels
5 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.
Sources
- Shewchuk, Adaptive Precision Floating-Point Arithmetic and Fast Robust Geometric Predicates, sections 2.2–2.3 (standard reference, not scraped)
- Fundamentals of Numerical Computation, floating-point arithmetic (standard reference, not scraped)
- Higham, The Accuracy of Floating Point Summation (standard reference, not scraped)
- Ogita, Rump, and Oishi, Accurate Sum and Dot Product (standard reference, not scraped)