FA-62278 / Currency rounding and FX conversion / Member archive
An inverted quote overrides the authoritative direct USD quote · case 03
When both USDEUR and EURUSD are present, crosses use the inverse of EURUSD.
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 fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression orientation-precedence 1 | "1.167513" | "1.167722" | 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 ↗