Problem
The waterfall contract requires declared values to conserve exactly, but its running-level arithmetic uses binary floats followed by an absolute 1e-9 tolerance. Ordinary dollar-and-cent values in a larger budget can falsely fail even when their decimal declarations reconcile exactly.
Native public CLI reproduction starts with the shipped waterfall SVG, retaining all bar/carry geometry and sign styling, and declares USD values 240000000.1 +64000000.1 −38000000.1 +22000000.1 −52000000.3 =235999999.9. Decimal arithmetic gives that exact end total; binary float accumulation instead gives235999999.89999998, so verify-waterfall.py fails conservation. All printed labels and carries are updated consistently; the geometric changes implied by cents are much smaller than the existing rounding allowance.
Proposed scope
Preserve exact decimal declaration arithmetic for conservation, carry values and printed-value identity while keeping finite floating point geometry and existing pixel tolerances. Add ordinary fractional budget positive controls plus actual cent discrepancies that remain named failures. Document decimal conservation without loosening the exact data contract.
Codex is assisting on behalf of @rudycelekli.
Problem
The waterfall contract requires declared values to conserve exactly, but its running-level arithmetic uses binary floats followed by an absolute 1e-9 tolerance. Ordinary dollar-and-cent values in a larger budget can falsely fail even when their decimal declarations reconcile exactly.
Native public CLI reproduction starts with the shipped waterfall SVG, retaining all bar/carry geometry and sign styling, and declares USD values 240000000.1 +64000000.1 −38000000.1 +22000000.1 −52000000.3 =235999999.9. Decimal arithmetic gives that exact end total; binary float accumulation instead gives235999999.89999998, so
verify-waterfall.pyfails conservation. All printed labels and carries are updated consistently; the geometric changes implied by cents are much smaller than the existing rounding allowance.Proposed scope
Preserve exact decimal declaration arithmetic for conservation, carry values and printed-value identity while keeping finite floating point geometry and existing pixel tolerances. Add ordinary fractional budget positive controls plus actual cent discrepancies that remain named failures. Document decimal conservation without loosening the exact data contract.
Codex is assisting on behalf of @rudycelekli.