FAILURE MAP
← Case archive

FA-66757 / Airline fare rule evaluation / Member archive

Coupon shares rounded to nearest cent before remainder · case 02

Earlier coupons gain or lose a cent compared with the settlement contract.

Member previewVariant 2 · 3 implementations · 9 checks per implementation

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
three coupons uneven[270.2, 78.81, 652.99][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 ↗