FAILURE MAP
← Case archive

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

A XXXUSD quote is used as units per USD without inversion · case 05

EURJPY is computed as 139.7 instead of 164.0.

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

solve(quotes, target): quotes maps six-letter pairs to rates (QUOTE units per BASE unit). For currency c, units per USD are: 1 for USD; quotes['USD'+c] if present (authoritative when both orientations exist); else 1/quotes[c+'USD']; else unknown. The target BBBQQQ rate = (QQQ per USD)/(BBB per USD), rounded half-even to 6 decimals and returned as a string; an unknown leg returns 'ERR:no-quote'.

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 quote-orientation 1"1.370382""0.856369"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 ↗