{"abstract":"Even money shows \"1\" instead of \"1/1\" and unreduced forms leak through.","category":"Betting odds conversion","checks":10,"contract":"Expand an American moneyline (\"+150\", \"150\" or \"-200\"; magnitude at least 100, otherwise \"invalid\"). Profit per unit is N/100 for positive or unsigned lines and 100/N for negative lines. Return [decimal price with two decimals, reduced fractional profit \"a/b\", implied probability percent with one decimal], all computed exactly and rounded half up.","contract_signature":"american","evaluation_group":"w2-odds-conversion-american-moneyline-expansion","failed_approach":"Using str() on the Fraction prints whole numbers without the '/1'.","family":"w2-odds-conversion-american-moneyline-expansion-fraction-rendering","id":"FA-84376","implementations":{"attempt":{"sha256":"5902228ce93752be511cb6e4ad89589500a0afaa4661090c8f778a79e94b2e30","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(american):\n    s = american.strip()\n    neg = s.startswith('-')\n    n = int(s.lstrip('+-'))\n    if n < 100:\n        return 'invalid'\n    profit = Fraction(100, n) if neg else Fraction(n, 100)\n    dec = 1 + profit\n    def fmt(x, places):\n        q = 10 ** places\n        v = math.floor(x * q + Fraction(1, 2))\n        return '%d.%0*d' % (v // q, places, v % q)\n    prob = Fraction(n, n + 100) * 100 if neg else Fraction(100, n + 100) * 100\n    return [fmt(dec, 2), str(profit), fmt(prob, 1)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('175',), ['2.75', '7/4', '36.4']),\n  ('regression: fraction rendering', ('800',), ['9.00', '8/1', '11.1']),\n  ('variant scenario 1', ('-283',), ['1.35', '100/283', '73.9']),\n  ('variant scenario 2', ('+660',), ['7.60', '33/5', '13.2'])],\n [('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('120',), ['2.20', '6/5', '45.5']),\n  ('regression: fraction rendering', ('+100',), ['2.00', '1/1', '50.0']),\n  ('variant scenario 1', ('756',), ['8.56', '189/25', '11.7']),\n  ('variant scenario 2', ('295',), ['3.95', '59/20', '25.3'])],\n [('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('168',), ['2.68', '42/25', '37.3']),\n  ('regression: fraction rendering', ('+200',), ['3.00', '2/1', '33.3']),\n  ('variant scenario 1', ('-125',), ['1.80', '4/5', '55.6']),\n  ('variant scenario 2', ('+225',), ['3.25', '9/4', '30.8'])],\n [('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('+1016',), ['11.16', '254/25', '9.0']),\n  ('regression: fraction rendering', ('+200',), ['3.00', '2/1', '33.3']),\n  ('variant scenario 1', ('845',), ['9.45', '169/20', '10.6']),\n  ('variant scenario 2', ('+1181',), ['12.81', '1181/100', '7.8'])],\n [('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('-225',), ['1.44', '4/9', '69.2']),\n  ('regression: fraction rendering', ('-100',), ['2.00', '1/1', '50.0']),\n  ('variant scenario 1', ('-249',), ['1.40', '100/249', '71.3']),\n  ('variant scenario 2', ('+175',), ['2.75', '7/4', '36.4'])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"472233db71f0525779841a5f4309503be9393eca15575e6e62542fe861cf4190","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(american):\n    s = american.strip()\n    neg = s.startswith('-')\n    n = int(s.lstrip('+-'))\n    if n < 100:\n        return 'invalid'\n    profit = Fraction(100, n) if neg else Fraction(n, 100)\n    dec = 1 + profit\n    def fmt(x, places):\n        q = 10 ** places\n        v = math.floor(x * q + Fraction(1, 2))\n        return '%d.%0*d' % (v // q, places, v % q)\n    prob = Fraction(n, n + 100) * 100 if neg else Fraction(100, n + 100) * 100\n    return [fmt(dec, 2), ('100/%d' % n if neg else '%d/100' % n), fmt(prob, 1)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('175',), ['2.75', '7/4', '36.4']),\n  ('regression: fraction rendering', ('800',), ['9.00', '8/1', '11.1']),\n  ('variant scenario 1', ('-283',), ['1.35', '100/283', '73.9']),\n  ('variant scenario 2', ('+660',), ['7.60', '33/5', '13.2'])],\n [('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('120',), ['2.20', '6/5', '45.5']),\n  ('regression: fraction rendering', ('+100',), ['2.00', '1/1', '50.0']),\n  ('variant scenario 1', ('756',), ['8.56', '189/25', '11.7']),\n  ('variant scenario 2', ('295',), ['3.95', '59/20', '25.3'])],\n [('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('168',), ['2.68', '42/25', '37.3']),\n  ('regression: fraction rendering', ('+200',), ['3.00', '2/1', '33.3']),\n  ('variant scenario 1', ('-125',), ['1.80', '4/5', '55.6']),\n  ('variant scenario 2', ('+225',), ['3.25', '9/4', '30.8'])],\n [('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('+1016',), ['11.16', '254/25', '9.0']),\n  ('regression: fraction rendering', ('+200',), ['3.00', '2/1', '33.3']),\n  ('variant scenario 1', ('845',), ['9.45', '169/20', '10.6']),\n  ('variant scenario 2', ('+1181',), ['12.81', '1181/100', '7.8'])],\n [('control underdog', ('+150',), ['2.50', '3/2', '40.0']),\n  ('control favourite', ('-200',), ['1.50', '1/2', '66.7']),\n  ('boundary even money', ('+100',), ['2.00', '1/1', '50.0']),\n  ('boundary unsigned line', ('250',), ['3.50', '5/2', '28.6']),\n  ('boundary below minimum', ('+50',), 'invalid'),\n  ('control half-up decimal', ('-800',), ['1.13', '1/8', '88.9']),\n  ('regression: fraction rendering', ('-225',), ['1.44', '4/9', '69.2']),\n  ('regression: fraction rendering', ('-100',), ['2.00', '1/1', '50.0']),\n  ('variant scenario 1', ('-249',), ['1.40', '100/249', '71.3']),\n  ('variant scenario 2', ('+175',), ['2.75', '7/4', '36.4'])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-odds-conversion-american-moneyline-expansion-fraction-rendering","generated_at":"2026-09-29T14:50:30.382488+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Odds screens show American, decimal, fractional and implied-probability columns for one price.","root_cause":"The fraction is rendered with an unreduced N/100 template.","sha256":"f2c65a8ca51af7f838946efc9e256d7844937af8d6e9ca5f48babf49c6d61875","title":"Whole-number fractional odds rendered without denominator · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":43.625,"exit_code":1,"observations":[{"actual":["2.50","3/2","40.0"],"check":"control underdog","expected":["2.50","3/2","40.0"],"passed":true},{"actual":["1.50","1/2","66.7"],"check":"control favourite","expected":["1.50","1/2","66.7"],"passed":true},{"actual":["2.00","1","50.0"],"check":"boundary even money","expected":["2.00","1/1","50.0"],"passed":false},{"actual":["3.50","5/2","28.6"],"check":"boundary unsigned line","expected":["3.50","5/2","28.6"],"passed":true},{"actual":"invalid","check":"boundary below minimum","expected":"invalid","passed":true},{"actual":["1.13","1/8","88.9"],"check":"control half-up decimal","expected":["1.13","1/8","88.9"],"passed":true},{"actual":["2.75","7/4","36.4"],"check":"regression: fraction rendering","expected":["2.75","7/4","36.4"],"passed":true},{"actual":["9.00","8","11.1"],"check":"regression: fraction rendering","expected":["9.00","8/1","11.1"],"passed":false},{"actual":["1.35","100/283","73.9"],"check":"variant scenario 1","expected":["1.35","100/283","73.9"],"passed":true},{"actual":["7.60","33/5","13.2"],"check":"variant scenario 2","expected":["7.60","33/5","13.2"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control underdog\", \"actual\": [\"2.50\", \"3/2\", \"40.0\"], \"expected\": [\"2.50\", \"3/2\", \"40.0\"], \"passed\": true}, {\"check\": \"control favourite\", \"actual\": [\"1.50\", \"1/2\", \"66.7\"], \"expected\": [\"1.50\", \"1/2\", \"66.7\"], \"passed\": true}, {\"check\": \"boundary even money\", \"actual\": [\"2.00\", \"1\", \"50.0\"], \"expected\": [\"2.00\", \"1/1\", \"50.0\"], \"passed\": false}, {\"check\": \"boundary unsigned line\", \"actual\": [\"3.50\", \"5/2\", \"28.6\"], \"expected\": [\"3.50\", \"5/2\", \"28.6\"], \"passed\": true}, {\"check\": \"boundary below minimum\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control half-up decimal\", \"actual\": [\"1.13\", \"1/8\", \"88.9\"], \"expected\": [\"1.13\", \"1/8\", \"88.9\"], \"passed\": true}, {\"check\": \"regression: fraction rendering\", \"actual\": [\"2.75\", \"7/4\", \"36.4\"], \"expected\": [\"2.75\", \"7/4\", \"36.4\"], \"passed\": true}, {\"check\": \"regression: fraction rendering\", \"actual\": [\"9.00\", \"8\", \"11.1\"], \"expected\": [\"9.00\", \"8/1\", \"11.1\"], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"1.35\", \"100/283\", \"73.9\"], \"expected\": [\"1.35\", \"100/283\", \"73.9\"], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [\"7.60\", \"33/5\", \"13.2\"], \"expected\": [\"7.60\", \"33/5\", \"13.2\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.991,"exit_code":1,"observations":[{"actual":["2.50","150/100","40.0"],"check":"control underdog","expected":["2.50","3/2","40.0"],"passed":false},{"actual":["1.50","100/200","66.7"],"check":"control favourite","expected":["1.50","1/2","66.7"],"passed":false},{"actual":["2.00","100/100","50.0"],"check":"boundary even money","expected":["2.00","1/1","50.0"],"passed":false},{"actual":["3.50","250/100","28.6"],"check":"boundary unsigned line","expected":["3.50","5/2","28.6"],"passed":false},{"actual":"invalid","check":"boundary below minimum","expected":"invalid","passed":true},{"actual":["1.13","100/800","88.9"],"check":"control half-up decimal","expected":["1.13","1/8","88.9"],"passed":false},{"actual":["2.75","175/100","36.4"],"check":"regression: fraction rendering","expected":["2.75","7/4","36.4"],"passed":false},{"actual":["9.00","800/100","11.1"],"check":"regression: fraction rendering","expected":["9.00","8/1","11.1"],"passed":false},{"actual":["1.35","100/283","73.9"],"check":"variant scenario 1","expected":["1.35","100/283","73.9"],"passed":true},{"actual":["7.60","660/100","13.2"],"check":"variant scenario 2","expected":["7.60","33/5","13.2"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control underdog\", \"actual\": [\"2.50\", \"150/100\", \"40.0\"], \"expected\": [\"2.50\", \"3/2\", \"40.0\"], \"passed\": false}, {\"check\": \"control favourite\", \"actual\": [\"1.50\", \"100/200\", \"66.7\"], \"expected\": [\"1.50\", \"1/2\", \"66.7\"], \"passed\": false}, {\"check\": \"boundary even money\", \"actual\": [\"2.00\", \"100/100\", \"50.0\"], \"expected\": [\"2.00\", \"1/1\", \"50.0\"], \"passed\": false}, {\"check\": \"boundary unsigned line\", \"actual\": [\"3.50\", \"250/100\", \"28.6\"], \"expected\": [\"3.50\", \"5/2\", \"28.6\"], \"passed\": false}, {\"check\": \"boundary below minimum\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control half-up decimal\", \"actual\": [\"1.13\", \"100/800\", \"88.9\"], \"expected\": [\"1.13\", \"1/8\", \"88.9\"], \"passed\": false}, {\"check\": \"regression: fraction rendering\", \"actual\": [\"2.75\", \"175/100\", \"36.4\"], \"expected\": [\"2.75\", \"7/4\", \"36.4\"], \"passed\": false}, {\"check\": \"regression: fraction rendering\", \"actual\": [\"9.00\", \"800/100\", \"11.1\"], \"expected\": [\"9.00\", \"8/1\", \"11.1\"], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"1.35\", \"100/283\", \"73.9\"], \"expected\": [\"1.35\", \"100/283\", \"73.9\"], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [\"7.60\", \"660/100\", \"13.2\"], \"expected\": [\"7.60\", \"33/5\", \"13.2\"], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}