FA-85715 / Ride-hailing fare and surge pricing / Member archive
Card payments rounded to the cash step · case 05
Swiss card payments are rounded to 5 centimes.
Case contract
Convert a fare to the payment currency with the directed rate fx[FROM+TO] = [num, den] (half up), then, for cash payments only, round half up to the payment currency cash step (CHF 5 centimes, SEK 100 ore, others 1). Card and wallet payments are not cash-rounded. Return the amount in minor units of the payment currency.
Why this case matters
Ride-hailing prices are computed per trip at scale; ordering, unit and boundary slips become systematic over- or under-charging.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: cash-only rounding | 2000 | 1999 | 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 ↗