FAILURE MAP
← Case archive

FA-84342 / Betting odds conversion / Member archive

Evens decimal price converted to a negative moneyline · case 02

A 2.00 price is displayed as -100 instead of +100.

Member previewVariant 2 · 3 implementations · 9 checks per implementation

Case contract

Convert a decimal price string to an American moneyline string. Prices at or below 1 return "invalid". For d >= 2 the line is "+" followed by 100 * (d - 1); for d < 2 it is "-" followed by 100 / (d - 1). The magnitude is computed exactly from the decimal text and rounded half up to an integer. Evens (2.00) is "+100".

Why this case matters

Sportsbooks display the same price in decimal and American formats and must agree at every boundary.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
boundary evens"-100""+100"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 ↗