FAILURE MAP
← Case archive

FA-62003 / Currency rounding and FX conversion / Member archive

The conversion rate is rounded to four decimals before use · case 03

Large conversions at five- or six-decimal rates are off by many minor units.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

solve(amount_minor, from_exp, to_exp, rate): amount_minor is an integer count of source minor units, rate a decimal string giving target major units per source major unit. The target minor amount is amount_minor * rate * 10**(to_exp - from_exp), computed exactly and rounded half-even to an integer.

Why this case matters

Currency amounts must be rounded at the right stage and in the right unit, or ledgers, quotes and settlements drift by minor units.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression rate-storage-scale 1547359918547357652Failed

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 ↗