FAILURE MAP
← Case archive

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

The day reset clears the running total but keeps the previous floor · case 04

The first posting of a new day is reduced by the previous day's accumulated floor.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

solve(items, rate): items are [day, amount] with integer source minor units (reversals negative) in posting order; rate is target minor units per source minor unit. Within a day, each posting's converted amount is floor(cumulative_exact) - floor(previous cumulative_exact), so daily converted postings sum to floor of the day's exact converted total. The carry (cumulative total and previous floor) resets whenever the day changes. Return the list of integer converted postings.

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 previous-floor-reset 1[399, -243, -65, 108, 218, 413][399, 156, -65, 199, 218, 413]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 ↗