FAILURE MAP
← Case archive

FA-84503 / Betting odds conversion / Member archive

Winner excluded from the place part or last place unpaid · case 03

The winner of an each-way bet receives only the win part, or the last paying place is missed.

Member previewVariant 3 · 3 implementations · 9 checks per implementation

Case contract

Each-way settlement with dead heats. stake_cents is the stake of each part (win and place). odds is fractional "a/b"; terms "1/4" or "1/5" is the place fraction of the odds. position is the finishing position shared by dead_heat runners (1 = no dead heat), occupying positions position .. position + dead_heat - 1. Win part: paid if position == 1 with stake / dead_heat at 1 + a/b. Place part: paid if position <= places_paid, with stake scaled by min(dead_heat, places_paid - position + 1) / dead_heat at 1 + (a/b) * terms. Return the total return in cents rounded down.

Why this case matters

Horse-racing settlement applies place terms and dead-heat reductions to each part separately.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
boundary dead heat for last place01500Failed

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 ↗