Alphabeta Math
TheoremStatement: Literature-sourcedProof: AI-adaptedPipeline-generatedjudge pass (gpt-6-luna)
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 p≥2: its normal positive values are m2j−p+1 for integers 2p−1≤m<2p and emin⁡≤j≤emax⁡, with their negatives and zero. Any additional representable values below the normal range must belong to the unbounded binary set Bp 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 a,b for which TwoSum error-free transformation succeeds, its output satisfies s=fl⁡(a+b),e=(a+b)−s,s+e=a+b 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.

[F1]

TwoSum error-free transformation evaluates six separately rounded operations: s=fl⁡(a+b), z=fl⁡(s−a), v=fl⁡(s−z), w=fl⁡(a−v), t=fl⁡(b−z), and e=fl⁡(w+t).

[F2]

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.

[F3]

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 Bp.

Proof

1.1givenF1F2F3algebra

Let R denote unbounded binary nearest-even rounding from [F3]. On the closed normal range, bounded-format rounding equals R: 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 Bp. By [F2], induction over the six operations [F1] therefore identifies the actual successful computation with the same sequence using R. It suffices to prove its unbounded identity.

2.1step 1.1F3algebra

Put ρ=s−(a+b). If ∣a∣≥∣b∣, the ordered transform [F3] gives z=s−a and R(b−z)=−ρ exactly. Consequently v=R(s−z)=a, w=0, t=−ρ, and e=−ρ. This includes a=b=0.

2.2step 1.1F3algebra

Suppose ∣a∣<∣b∣. If ∣s∣<∣a∣, the small-rounded-sum assertion [F3] makes s=a+b exact. Then z=b, v=a, w=t=e=0 and ρ=0. For the remaining case ∣s∣≥∣a∣, apply the ordered transform to (s,−a): it says R(z−s)=z−s and R(−a−(z−s))=(s−a)−z. Oddness therefore gives v=R(s−z)=s−z and w=R(a−v)=z−(s−a) exactly. Writing σ=z−(s−a), we have w=σ and z=b+ρ+σ.

3.1step 2.2F3algebra

In this remaining case, oddness permits simultaneous sign reversal so that b>0. Since ∣a∣<b, we have 0<a+b<2b, and monotonicity gives 0<s≤2b. Thus q(s)≤q(2b)=2q(b) and the rounding bound yields ∣ρ∣≤q(b)≤b/2, since p≥2. Also ∣ρ∣≤∣a∣<b by the addition-error bound. Therefore b/2≤s−a=b+ρ<2b; monotonicity, fixing b/2 and 2b, gives b/2≤z≤2b. Sterbenz [F3] makes t=R(b−z)=b−z=−ρ−σ exact. Finally w+t=−ρ is representable by the addition-error assertion [F3], so e=R(w+t)=−ρ exactly. Oddness gives the same conclusion before sign reversal.

4.1step 1.1step 2.1step 2.2step 3.1F2algebra∎

The branches in steps 2.1, 2.2, and 3.1 cover every magnitude order and sign, and each gives e=−ρ=(a+b)−s. Step 1.1 transfers this identity to every successful finite-range call, proving s+e=a+b. 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 p≥3; step 3.1 uses the sharper bound on s−a directly to include p=2 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