Skip to content

test: one exact reference library for every operation #407

Description

@thedavidmeister

One exact Solidity reference for every operation, so that no test takes its expected value from the implementation.

Today the exact maths is split across LibTestExactDecimal, LibDecimalFloatSlow, LibTranscendentalOracle and per-test helpers. Some are exact (mulParts, the add rule, cmpScaled, maximize, overflows); some replay the implementation (divParts/invParts precision #374, mulSlow #362, invSlow #361). Each re-derives the rounding rule.

Target: LibExactFloat (test-only).

Sequencing: the open test-audit PRs (#389 to #403) already move individual tests onto LibTestExactDecimal. Land those, then consolidate them into this library. Don't do it in parallel, because they all touch the same file.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions