Alphabeta Math
TheoremStatement: AI-adaptedProof: AI-adaptedPipeline-generatedprecheck pass
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.

Kahan and Neumaier summation satisfy explicit finite data-dependent error bounds

Statement

Let the input length be n∈N0. If n=0, both algorithms return exactly zero, the sum of the empty input, and their absolute errors are zero. Kahan executes no loop operations and returns s0=0; Neumaier executes no loop operations and its final addition returns fl⁡(s0+c0)=0, with final rounding error ϵf=0. The Kahan identity and bound below apply when n≥1; no y0, s−1, or ϵ0s is required in the empty branch.

For n≥1 successfully processed real inputs x1,…,xn, let ϵiy,ϵis,ϵid,ϵic be the signed errors in the four Kahan operations. Then sn−∑i=1nxi=∑i=1nϵiy+ϵns−∑i=1n−1(ϵid+ϵic), hence ∣sn−∑ixi∣≤u∑i∣xi−ci−1∣+u∣sn−1+yn∣+u∑i<n(∣si−si−1∣+∣di−yi∣). For Neumaier, let ϵit,ϵiq,ϵia,ϵic be the signed errors at the actually executed operations and ϵf the final rounding error. Then s^−∑ixi=∑i(ϵiq+ϵia+ϵic)+ϵf. The leading-sum error ϵit cancels from this exact identity; its nonnegative allowance may still be retained in the conservative bound below. For each i, define Pi by the branch-specific expression below. Then ∣s^−∑ixi∣≤u∑iPi+u∣sn+cn∣, where the final term accounts for the last rounded addition. These are finite data-dependent bounds, not uniform relative-error claims.

Pi=∣si−1∣+∣xi∣+{∣si−1∣+∣ti∣,∣si−1∣≥∣xi∣,∣xi∣+∣ti∣,∣si−1∣<∣xi∣+{∣qi∣+∣xi∣,∣si−1∣≥∣xi∣,∣qi∣+∣si−1∣,∣si−1∣<∣xi∣+∣ci−1∣+∣ai∣.

Facts & Assumptions

Given: the successful recurrences and operationwise relative-error model.

[F1]

Kahan compensated summation with range-failure status: its four rounded operations are y_i, s_i, d_i, and c_i in the stated order.

[F2]

Neumaier compensated summation with range-failure status: each step forms t_i, a branch-dependent q_i and a_i, updates c_i, then rounds the final s_n+c_n.

[F3]

Operationwise real and complex floating point arithmetic with rounded square roots and fused multiply-add: every successful real operation has absolute error at most u times the absolute value of its exact result. An exact zero result is admissible and is rounded exactly to zero.

Proof

1.1givenF1F2F3algebra

If n=0, the loop index sets in [F1] and [F2] are empty, and their initial values are s0=c0=0. Thus Kahan returns s0=0 without a rounded operation. Neumaier's final exact sum is s0+c0=0; [F3] rounds this representable zero exactly and does not fail, so its returned value and final rounding error are both zero. The exact sum of the empty input is zero, proving both zero-error claims. For the remaining Kahan indexed formulas assume n≥1; the Neumaier formulas also specialize at n=0 to empty sums and ϵf=0.

1.2givenF1F3algebra

For Kahan write y_i=x_i-c_{i-1}+epsilon_i^y and s_i=s_{i-1}+y_i+epsilon_i^s. Then d_i=s_i-s_{i-1}+epsilon_i^d and c_i=d_i-y_i+epsilon_i^c=epsilon_i^s+epsilon_i^d+epsilon_i^c.

1.3givenF2F3algebra

In the first Neumaier branch, q_i=s_{i-1}-t_i+epsilon_i^q and a_i=q_i+x_i+epsilon_i^a, so t_i+a_i=s_{i-1}+x_i+epsilon_i^q+epsilon_i^a. In the second branch, q_i=x_i-t_i+epsilon_i^q and a_i=q_i+s_{i-1}+epsilon_i^a give the same identity. Thus the error in forming t_i cancels in both branches. Since s_i=t_i and c_i=c_{i-1}+a_i+epsilon_i^c, summing s_i+c_i-(s_{i-1}+c_{i-1}) telescopes to the corrected Neumaier identity before final rounding; the returned addition contributes epsilon^f.

2.1step 1.2F3algebra

Summing s_i-s_{i-1}=x_i-c_{i-1}+epsilon_i^y+epsilon_i^s and substituting the formula for c_{i-1} cancels epsilon_i^s for i<n and gives the displayed Kahan identity. Bounding the remaining local errors by [F3] yields its stated finite bound.

3.1step 1.3F3algebra∎

Take absolute values in the corrected identity. By [F3], the q_i error is bounded by u times the sum of the magnitudes in the first branch-specific term of P_i, the a_i error by u times the second branch-specific term, and the c_i error by u(|c_{i-1}|+|a_i|). Their sum is at most uP_i because the remaining term u(|s_{i-1}|+|x_i|) is nonnegative. The final addition contributes at most u|s_n+c_n|. This proves the unchanged conservative Neumaier bound. No step divides by the exact sum, so no uniform relative bound follows.

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