FAILURE MAP
← Case archive

FA-84711 / Betting odds conversion / Open access

Takeout kept as the net pool or divided out · case 01

Dividends are tiny, or slightly too high.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The net pool is computed as pool * takeout / 100.

VERIFIED REPAIR

Use pool * (100 - takeout) / 100.

Unsuccessful approach: Dividing by 1 + takeout removes less than the stated percentage.

Case contract

Pari-mutuel win dividend per unit stake. The net pool is pool * (100 - takeout_pct) / 100; with a dead heat it is split equally among the winning runners. Each runner's dividend is its share divided by the stakes on it, broken down to the 10-cent step below (breakage), with a minimum of 1.10. A winner with no stakes gets None. Return dividends as "D.D0" strings in winners order.

Why this case matters

Tote operators compute dividends with takeout, breakage and minimum-dividend rules.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(pool_cents, takeout_pct, winners):
    net = Fraction(pool_cents) * Fraction(takeout_pct) / 100
    share = net / len(winners)
    out = []
    for s in winners:
        if s == 0:
            out.append(None)
            continue
        dimes = math.floor(share / s * 10)
        dimes = max(dimes, 11)
        out.append('%d.%d0' % (dimes // 10, dimes % 10))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
    try:
        return solve(*args)
    except Exception as exc:
        return 'raised ' + type(exc).__name__
cases = [[('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application',
   (250000, '16', [12305, 5000, 116734]),
   ['5.60', '14.00', '1.10']),
  ('variant scenario 1', (20000, '20', [884, 13602]), ['9.00', '1.10']),
  ('variant scenario 2', (50000, '20', [10000]), ['4.00'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application',
   (1234500, '20', [564505, 846773, 5000]),
   ['1.10', '1.10', '65.80']),
  ('variant scenario 1', (20000, '20', [8118]), ['1.90']),
  ('variant scenario 2', (1234500, '20', [10000, 40000, 1174709]), ['32.90', '8.20', '1.10'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application', (50000, '15', [11107]), ['3.80']),
  ('variant scenario 1', (250000, '15', [0]), [None]),
  ('variant scenario 2', (1234500, '16', [864394, 1059735, 1234500]), ['1.10', '1.10', '1.10'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application', (100000, '15', [1500, 91738]), ['28.30', '1.10']),
  ('variant scenario 1', (100000, '15', [69872, 70392, 1500]), ['1.10', '1.10', '18.80']),
  ('variant scenario 2', (1234500, '16', [555465]), ['1.80'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application', (1234500, '0', [617250, 390837]), ['1.10', '1.50']),
  ('regression: takeout application', (20000, '16', [5000]), ['3.30']),
  ('variant scenario 1', (100000, '16', [55428, 50000, 100000]), ['1.10', '1.10', '1.10']),
  ('variant scenario 2', (50000, '16', [40497, 21355, 36633]), ['1.10', '1.10', '1.10'])]]
for label, args, expected in cases[N - 1]:
    check(label, run(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
control single winner['1.10']['3.40']Failed
boundary breakage down['1.10']['2.80']Failed
boundary minimum dividend['1.10']['1.10']Passed
boundary dead heat split['1.10', '1.10']['4.00', '1.10']Failed
control unbacked winner[None][None]Passed
regression: takeout application['1.10', '2.60', '1.10']['5.60', '14.00', '1.10']Failed
variant scenario 1['2.20', '1.10']['9.00', '1.10']Failed
variant scenario 2['1.10']['4.00']Failed

SHA-256 / 0e24f4680088ec85d518c8a0ccc61e58c7fc6109dcbfddd65a563d486cf04b21

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(pool_cents, takeout_pct, winners):
    net = Fraction(pool_cents) / (1 + Fraction(takeout_pct) / 100)
    share = net / len(winners)
    out = []
    for s in winners:
        if s == 0:
            out.append(None)
            continue
        dimes = math.floor(share / s * 10)
        dimes = max(dimes, 11)
        out.append('%d.%d0' % (dimes // 10, dimes % 10))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
    try:
        return solve(*args)
    except Exception as exc:
        return 'raised ' + type(exc).__name__
cases = [[('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application',
   (250000, '16', [12305, 5000, 116734]),
   ['5.60', '14.00', '1.10']),
  ('variant scenario 1', (20000, '20', [884, 13602]), ['9.00', '1.10']),
  ('variant scenario 2', (50000, '20', [10000]), ['4.00'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application',
   (1234500, '20', [564505, 846773, 5000]),
   ['1.10', '1.10', '65.80']),
  ('variant scenario 1', (20000, '20', [8118]), ['1.90']),
  ('variant scenario 2', (1234500, '20', [10000, 40000, 1174709]), ['32.90', '8.20', '1.10'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application', (50000, '15', [11107]), ['3.80']),
  ('variant scenario 1', (250000, '15', [0]), [None]),
  ('variant scenario 2', (1234500, '16', [864394, 1059735, 1234500]), ['1.10', '1.10', '1.10'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application', (100000, '15', [1500, 91738]), ['28.30', '1.10']),
  ('variant scenario 1', (100000, '15', [69872, 70392, 1500]), ['1.10', '1.10', '18.80']),
  ('variant scenario 2', (1234500, '16', [555465]), ['1.80'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application', (1234500, '0', [617250, 390837]), ['1.10', '1.50']),
  ('regression: takeout application', (20000, '16', [5000]), ['3.30']),
  ('variant scenario 1', (100000, '16', [55428, 50000, 100000]), ['1.10', '1.10', '1.10']),
  ('variant scenario 2', (50000, '16', [40497, 21355, 36633]), ['1.10', '1.10', '1.10'])]]
for label, args, expected in cases[N - 1]:
    check(label, run(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
control single winner['3.40']['3.40']Passed
boundary breakage down['2.80']['2.80']Passed
boundary minimum dividend['1.10']['1.10']Passed
boundary dead heat split['4.10', '1.10']['4.00', '1.10']Failed
control unbacked winner[None][None]Passed
regression: takeout application['5.80', '14.30', '1.10']['5.60', '14.00', '1.10']Failed
variant scenario 1['9.40', '1.10']['9.00', '1.10']Failed
variant scenario 2['4.10']['4.00']Failed

SHA-256 / 4391fbea70e1291dfae0e3269da928a5a5ff68bfdff010fecc0fe5294aaa3e45

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
import math
N = 1
observations = []
def solve(pool_cents, takeout_pct, winners):
    net = Fraction(pool_cents) * (100 - Fraction(takeout_pct)) / 100
    share = net / len(winners)
    out = []
    for s in winners:
        if s == 0:
            out.append(None)
            continue
        dimes = math.floor(share / s * 10)
        dimes = max(dimes, 11)
        out.append('%d.%d0' % (dimes // 10, dimes % 10))
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
    try:
        return solve(*args)
    except Exception as exc:
        return 'raised ' + type(exc).__name__
cases = [[('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application',
   (250000, '16', [12305, 5000, 116734]),
   ['5.60', '14.00', '1.10']),
  ('variant scenario 1', (20000, '20', [884, 13602]), ['9.00', '1.10']),
  ('variant scenario 2', (50000, '20', [10000]), ['4.00'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application',
   (1234500, '20', [564505, 846773, 5000]),
   ['1.10', '1.10', '65.80']),
  ('variant scenario 1', (20000, '20', [8118]), ['1.90']),
  ('variant scenario 2', (1234500, '20', [10000, 40000, 1174709]), ['32.90', '8.20', '1.10'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application', (50000, '15', [11107]), ['3.80']),
  ('variant scenario 1', (250000, '15', [0]), [None]),
  ('variant scenario 2', (1234500, '16', [864394, 1059735, 1234500]), ['1.10', '1.10', '1.10'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application', (100000, '15', [1500, 91738]), ['28.30', '1.10']),
  ('variant scenario 1', (100000, '15', [69872, 70392, 1500]), ['1.10', '1.10', '18.80']),
  ('variant scenario 2', (1234500, '16', [555465]), ['1.80'])],
 [('control single winner', (100000, '15', [25000]), ['3.40']),
  ('boundary breakage down', (100000, '16', [30000]), ['2.80']),
  ('boundary minimum dividend', (100000, '20', [90000]), ['1.10']),
  ('boundary dead heat split', (100000, '20', [10000, 40000]), ['4.00', '1.10']),
  ('control unbacked winner', (100000, '15', [0]), [None]),
  ('regression: takeout application', (1234500, '0', [617250, 390837]), ['1.10', '1.50']),
  ('regression: takeout application', (20000, '16', [5000]), ['3.30']),
  ('variant scenario 1', (100000, '16', [55428, 50000, 100000]), ['1.10', '1.10', '1.10']),
  ('variant scenario 2', (50000, '16', [40497, 21355, 36633]), ['1.10', '1.10', '1.10'])]]
for label, args, expected in cases[N - 1]:
    check(label, run(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
control single winner['3.40']['3.40']Passed
boundary breakage down['2.80']['2.80']Passed
boundary minimum dividend['1.10']['1.10']Passed
boundary dead heat split['4.00', '1.10']['4.00', '1.10']Passed
control unbacked winner[None][None]Passed
regression: takeout application['5.60', '14.00', '1.10']['5.60', '14.00', '1.10']Passed
variant scenario 1['9.00', '1.10']['9.00', '1.10']Passed
variant scenario 2['4.00']['4.00']Passed

SHA-256 / 6600d6a99d20dbb51d6d1e4e9b401d2836b25bedd136d5273105439a73d9fc07

Verification & scope

Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any operator, exchange or regulator rule set. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:50:33.679929+00:00.

Case digest / b137d5f6fd06e0a1a7995767e825b4ed04575f47ed2eb80d7ccff781b7a3183b