FAILURE MAP
← Case archive

FA-66749 / Airline fare rule evaluation / Member archive

Rounding remainder assigned to the first coupon · case 04

The first coupon carries the remainder, even when it is a surface sector with no miles.

Member previewVariant 4 · 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.75, 78.96, 654.29][270.74, 78.96, 654.3]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 ↗