FAILURE MAP
← Case archive

FA-84402 / Betting odds conversion / Member archive

Zero numerator or denominator accepted · case 02

"5/0" raises a division error and "0/1" is priced at 1.00.

Member previewVariant 2 · 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 zero denominator"raised ZeroDivisionError""invalid"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 ↗