Skip to content

"The split is exact" does not hold in floating point #9

Closed

Description

@mklarmann

SPEC 1 and 7 say the steps' differences add up to the whole difference exactly, and the page prints a fixed "100 %". In floating point they do not: over 20,000 random made-up 5-state series, 13,601 sums of shares are not exactly 1, off by up to 1.47 where steps cancel across 16 orders of magnitude (e.g. 1 → 1e16 → 1 → 2). Test A18 checks a telescoping sum over the fixture, not the code.

Proposed: SPEC says exact up to rounding; the page prints the sum of the shares it shows, and where the steps cancel (their differences far larger than the whole) it says so instead of printing large shares of both signs. A18 tests the code.

Needs a decision. The fix on first-version takes the option above; Manuel confirms it or picks another in review.

Found by sentier-bafu's agent review of pull request #2 (head 5c19866), confirmed again on 0e1f5be. Being fixed on the same branch, first-version.

Activity

  1. added
    bugSomething isn't working
    needs-triageMaintainer needs to evaluate this issue
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageMaintainer needs to evaluate this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions