FA-66758 / Airline fare rule evaluation / Member archive
Coupon shares rounded to nearest cent before remainder · case 03
Earlier coupons gain or lose a cent compared with the settlement contract.
Case contract
Input {'fare','tpm':[miles per coupon, 0 for surface]}. Work in integer cents: each coupon gets floor(cents*tpm/total); the rounding remainder goes to the last coupon with nonzero miles; surface coupons get 0. No miles -> 'ERR_NO_MILES'. Return coupon values in currency units.
Why this case matters
Prorating a through fare across coupons by mileage must conserve the fare to the cent and keep value off surface sectors.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| three coupons uneven | [270.47, 78.89, 653.64] | [270.47, 78.88, 653.65] | 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 ↗