Choose the numerical contract
Take three exactly representable floating-point inputs: 2**53, 1 and −2**53. Their exact sum is 1. In the retained Python example, adding from left to right gives 0. Adding from right to left gives 1. A check that treats the left-order result as its reference rejects the right-order result, even though the latter meets the numerical contract chosen here.[3][4]
That contract is explicit: return the correctly rounded floating-point value of the exact sum of the supplied binary64 values. It is not a requirement for every reduction library or benchmark. A task can legitimately require a specified sequential order instead, or allow an error bound. Those contracts can disagree. Calling a function the reference does not decide which one was intended.[3][4]
- Choose the oracle contract: The left-order reference returns 0; the rounded exact-input sum is 1. Agreement with a reference is not an independent specification.
Retain the operation order
All inputs are already exact binary floating-point values. There is no decimal-to-float ambiguity in the first example. At 2**53, the intermediate addition of 1 rounds back to 2**53. Subtracting 2**53 then leaves 0. In the right-order calculation, 1−2**53 is representable, and adding 2**53 leaves 1. The saved ledger retains every operand, intermediate result and local rounding error as hexadecimal values and exact ratios.[3][4]
The sign-reversed case prevents a misleading recommendation to reverse every reduction. For [−2**53, 1, 2**53], left order returns 1 and right order returns 0. A balanced split returns 0 in this three-value case. No one of these fixed orders becomes an exact oracle just because it succeeds on the first row.[3][4]
Two small terms also distinguish the tree. For [2**53, 1, 1, −2**53], the exact sum is 2. Left order returns 0, right order returns 2, and the declared balanced tree returns 1. Changing both small terms to −1 gives exact sum −2, with results −2, 0 and −1. This is finite arithmetic evidence for the selected expressions, not a measurement of a GPU reduction or its compiler.[3][4]
State the final rounding rule
The remaining rows retain ordinary agreement and the final-rounding boundary. The benign integer, zero and fractional sums agree in all three orders. For [2**53, 1], the exact sum is 2**53+1, which is not representable in this float format. The chosen rounded target is 2**53; all three orders meet that contract even though each differs from the unrounded rational sum by −1. An exact rational oracle still needs the output conversion rule stated.[3][4]
- Keep the counterexample: Reversing signs makes left order succeed and right order fail. No fixed order wins every authored row.
All eight authored cases, with A=2**53. Values come from the one retained CPU execution; each order is specified in the protocol.
| Authored case | Exact sum | Rounded target | Left | Right | Balanced |
|---|---|---|---|---|---|
| lost positive | 1 | 1 | 0 | 1 | 1 |
| sign-reversed case | 1 | 1 | 1 | 0 | 0 |
| two positive | 2 | 2 | 0 | 2 | 1 |
| two negative | -2 | -2 | -2 | 0 | -1 |
| benign | 6 | 6 | 6 | 6 | 6 |
| exact zero | 0 | 0 | 0 | 0 | 0 |
| fractional | 7/8 | 7/8 | 7/8 | 7/8 | 7/8 |
| final round | A+1 | A | A | A | A |
- The chosen contract is the rounded exact sum of the supplied float values. It is not a universal library or kernel requirement.
- Final-round has exact sum A+1 but target A. Matching the target and matching the unrounded rational sum are separate checks.
Original execution, credit and scope
One standard-library CPU invocation on 2026-11-29 UTC retained eight cases, 24 method results, eight literal expected-record checks and fifteen selected controls. Twelve controls require refusal of malformed or out-of-domain input; three positive controls retain singleton, zero and order-reversal boundaries. The recorded environment passes the declared radix-2, 53-bit, nearest-rounding guard. The worksheet does not call Python’s built-in sum on floats; its left, right and recursive split operations are written explicitly.[3][4][5]
Python’s floating-point documentation explains rounding at arithmetic steps and the use of hexadecimal values and integer ratios to expose stored values. Its fractions documentation supplies the exact representation used here. Nodus authored the examples, expectations, operation logs and proof. Fraction represents the actual supplied floats; it does not recover a different intended decimal input.[1][2][3]
For a reduction reward, preserve the input representation, accumulation order, output conversion and permitted error before interpreting a disagreement. A higher-accuracy candidate can disagree with a lower-accuracy reference under one contract; an order-specific task may judge the same pair differently. The MIT download retains the complete result and a runnable version of this finite check.[3][4]
- Keep the reduction order and numerical contract attached to each correctness verdict.
Sources
- Python Software Foundation and documentation contributors — Floating Point Arithmetic: Issues and Limitations docs.python.org
- Python Software Foundation and documentation contributors — fractions docs.python.org
- MIT source and complete saved result data.nodus-compute.ai
- Complete result JSON data.nodus-compute.ai
- Original execution and saved-result provenance data.nodus-compute.ai
- Vector figure data.nodus-compute.ai
