FAILURE MAP
← Case archive

FA-84394 / Betting odds conversion / Member archive

Odds-on suffix stripped but the price not inverted · case 04

"2/1 on" is priced as 3.00 instead of 1.50.

Member previewVariant 4 · 3 implementations · 10 checks per implementation

Case contract

Parse traditional fractional odds text, case-insensitively: "a/b" or "a-b" with positive integers, "evens"/"evs"/"even" for 1/1, and an optional trailing " on" meaning odds-on (the fraction is inverted, "2/1 on" = 1/2). Zero parts or anything else return "invalid". Return [decimal price rounded half up to two decimals, reduced profit fraction "a/b"].

Why this case matters

Racing feeds and manual price entry use traditional fractional notation with odds-on suffixes.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
boundary odds-on suffix["3.00", "2/1"]["1.50", "1/2"]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 ↗