FAILURE MAP
← Case archive

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

The cross rate divides base-per-USD by quote-per-USD · case 04

EURJPY is returned as its reciprocal.

Member previewVariant 4 · 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 cross-division-order 1"1.083500""0.922935"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 ↗