Styxis
Company
Knowledge

Checking Arrow rounding grids separately from tie-breaking

Verify both membership of the rounding grid and the policy used to choose a neighboring multiple.

A grid member can still be the wrong answer

Rounding validation has two conditions: the result belongs to the intended grid, and tie-breaking selects the correct member. An off-grid value is an immediate contradiction, but an on-grid value may still be the wrong neighbor. Store the rounding quantum and the chosen rule, such as half-even, with the reference calculation. [1, 2, 3]

Corrected constants do not finish the repair

The PyArrow 26.0.1 report rounds 250000000000 at a quantum of 10 to the power 11, or 100000000000 and obtains 299999993856 instead of the default half-even result 200000000000. It also describes a false tie exposed by a candidate constant correction. Its verification used a separately compiled translation unit, not a full current-main build. [1]

Choose the reference representation

Record the business rounding interval and tie policy, then compare results with an independent integer or Decimal calculation. Also record whether the intended input is an original decimal value or an already-rounded binary64 value. That choice can change boundary expectations. Store grid remainders separately from differences against the reference result. [1, 3]

One explicit passing and failing tie

Define an illustrative input of 250000000000, a quantum of 100000000000 and half-even. The tie chooses even coefficient 2, so the expected result is 200000000000. That value passes; 299999993856 fails both the expected-value comparison and exact grid membership. This example does not validate every other tie-breaking case. [1, 3]

Truthound compares the approved expectation

Truthound Core's ColumnPairValidator can compare independently prepared expected and observed columns aligned by input identity. Preparing the Decimal or integer oracle and choosing any tolerance remain external responsibilities. Instead of widening tolerance to hide a discrepancy, classify it as a grid violation or a tie-selection difference and investigate the engine and policy used. [1, 2, 3]

Application conditions

Prepare input_decimal, rounding_quantum, tie_policy, expected_rounded and observed_rounded from original data or an independent reference, aligned to the same run, file and key scope.

Alternatives

Use approved integer or Decimal rounding as the independent reference.

Limitations

  • Do not claim that floating-point error has been eliminated. The source distinguishes a separately compiled translation unit from a complete main build.

Evidence

Event checked
Subject checked
Modified