FA-66742 / Airline fare rule evaluation / Member archive
Prorated coupon values do not add up to the fare · case 02
Interline settlement is short by a few cents on most tickets.
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.2, 78.8, 652.98] | [270.2, 78.8, 653.0] | 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 ↗