FA-59512 / Subscription proration billing / Member archive
Prorated amounts in currency minor units: fraction zero padding · case 02
Amounts like 12.05 display as 12.5.
Case contract
Input {price (signed minor units), currency, num, den}. Exponents: USD 2, EUR 2, JPY 0, KWD 3, CLP 0. Amount = price*num/den rounded half away from zero. Display: zero-exponent currencies show an integer; others show sign, major units, a dot and exactly exponent digits, then a space and the code. Return {minor, display}.
Why this case matters
Prorated amounts must round and render in each currency's own minor-unit precision, including credits.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression 0 | {"display": "-0.35 KWD", "minor": -35} | {"display": "-0.035 KWD", "minor": -35} | 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 ↗