FA-343 / Integer arithmetic / Member archive
A positive-only tie rule rounds negative halves toward zero · case 03
Exact midpoint values receive even rounding or asymmetric rounding instead of the required away-from-zero result.
Case contract
Round numerator/denominator to the nearest integer, with exact ties away from zero. Inputs are integers and denominator must be positive; invalid denominators return None. No decimal parsing or floating-point conversion occurs.
Why this case matters
Quantizers and fixed-point protocols need an explicit signed tie rule. The failure here is a rounding-policy mismatch, separate from binary representation error when parsing decimals.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| positive half after even integer | 6 | 7 | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗