FAILURE MAP
← Case archive

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

Net positions are computed as paid minus received · case 02

Currencies we receive are reported as outgoing payments.

Member previewVariant 2 · 3 implementations · 6 checks per implementation

Case contract

solve(trades): each trade is [pay_ccy, pay_amount, recv_ccy, recv_amount] from our side. Net per currency = received - paid. Return [[ccy, net], ...] sorted by currency code, omitting currencies whose net is exactly zero; nets are plain strings at the currency exponent (JPY 0, KWD 3, else 2).

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 net-direction 1[["KWD", "0.250"]][["KWD", "-0.250"]]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 ↗