{"abstract":"A -200 favourite is expanded as a 3.00 decimal price.","category":"Betting odds conversion","checks":9,"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 100 / (N + 100) mixes in the implied-probability formula and understates the profit.","family":"w2-odds-conversion-american-moneyline-expansion-favourite-profit","id":"FA-84366","implementations":{"attempt":{"sha256":"aa949d2b87d9badc85c83f40c1c086414bd5bea8c07824051ee4fa96c6234a8a","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 + 100) 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), '%d/%d' % (profit.numerator, profit.denominator), 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: favourite profit', ('-105',), ['1.95', '20/21', '51.2']),\n  ('variant scenario 1', ('162',), ['2.62', '81/50', '38.2']),\n  ('variant scenario 2', ('-277',), ['1.36', '100/277', '73.5'])],\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: favourite profit', ('-474',), ['1.21', '50/237', '82.6']),\n  ('variant scenario 1', ('+1140',), ['12.40', '57/5', '8.1']),\n  ('variant scenario 2', ('+1195',), ['12.95', '239/20', '7.7'])],\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: favourite profit', ('-1020',), ['1.10', '5/51', '91.1']),\n  ('variant scenario 1', ('110',), ['2.10', '11/10', '47.6']),\n  ('variant scenario 2', ('-225',), ['1.44', '4/9', '69.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: favourite profit', ('-397',), ['1.25', '100/397', '79.9']),\n  ('variant scenario 1', ('+355',), ['4.55', '71/20', '22.0']),\n  ('variant scenario 2', ('-179',), ['1.56', '100/179', '64.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: favourite profit', ('-363',), ['1.28', '100/363', '78.4']),\n  ('variant scenario 1', ('267',), ['3.67', '267/100', '27.2']),\n  ('variant scenario 2', ('+486',), ['5.86', '243/50', '17.1'])]]\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":"8830d5fe2291a698bd6f410e5800095dbb301e676cc3c2d1d6cbbb897558bd1f","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(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), '%d/%d' % (profit.numerator, profit.denominator), 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: favourite profit', ('-105',), ['1.95', '20/21', '51.2']),\n  ('variant scenario 1', ('162',), ['2.62', '81/50', '38.2']),\n  ('variant scenario 2', ('-277',), ['1.36', '100/277', '73.5'])],\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: favourite profit', ('-474',), ['1.21', '50/237', '82.6']),\n  ('variant scenario 1', ('+1140',), ['12.40', '57/5', '8.1']),\n  ('variant scenario 2', ('+1195',), ['12.95', '239/20', '7.7'])],\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: favourite profit', ('-1020',), ['1.10', '5/51', '91.1']),\n  ('variant scenario 1', ('110',), ['2.10', '11/10', '47.6']),\n  ('variant scenario 2', ('-225',), ['1.44', '4/9', '69.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: favourite profit', ('-397',), ['1.25', '100/397', '79.9']),\n  ('variant scenario 1', ('+355',), ['4.55', '71/20', '22.0']),\n  ('variant scenario 2', ('-179',), ['1.56', '100/179', '64.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: favourite profit', ('-363',), ['1.28', '100/363', '78.4']),\n  ('variant scenario 1', ('267',), ['3.67', '267/100', '27.2']),\n  ('variant scenario 2', ('+486',), ['5.86', '243/50', '17.1'])]]\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-favourite-profit","generated_at":"2026-09-29T14:50:30.283778+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 sign is ignored and the magnitude is always divided by 100.","sha256":"cf94529f93081043bf7dc72ed071416dd0e4ed1153f5850349b143ed09359194","title":"Negative moneyline profit computed from the wrong ratio · 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":42.684,"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.33","1/3","66.7"],"check":"control favourite","expected":["1.50","1/2","66.7"],"passed":false},{"actual":["2.00","1/1","50.0"],"check":"boundary even money","expected":["2.00","1/1","50.0"],"passed":true},{"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.11","1/9","88.9"],"check":"control half-up decimal","expected":["1.13","1/8","88.9"],"passed":false},{"actual":["1.49","20/41","51.2"],"check":"regression: favourite profit","expected":["1.95","20/21","51.2"],"passed":false},{"actual":["2.62","81/50","38.2"],"check":"variant scenario 1","expected":["2.62","81/50","38.2"],"passed":true},{"actual":["1.27","100/377","73.5"],"check":"variant scenario 2","expected":["1.36","100/277","73.5"],"passed":false}],"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.33\", \"1/3\", \"66.7\"], \"expected\": [\"1.50\", \"1/2\", \"66.7\"], \"passed\": false}, {\"check\": \"boundary even money\", \"actual\": [\"2.00\", \"1/1\", \"50.0\"], \"expected\": [\"2.00\", \"1/1\", \"50.0\"], \"passed\": true}, {\"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.11\", \"1/9\", \"88.9\"], \"expected\": [\"1.13\", \"1/8\", \"88.9\"], \"passed\": false}, {\"check\": \"regression: favourite profit\", \"actual\": [\"1.49\", \"20/41\", \"51.2\"], \"expected\": [\"1.95\", \"20/21\", \"51.2\"], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"2.62\", \"81/50\", \"38.2\"], \"expected\": [\"2.62\", \"81/50\", \"38.2\"], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [\"1.27\", \"100/377\", \"73.5\"], \"expected\": [\"1.36\", \"100/277\", \"73.5\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.725,"exit_code":1,"observations":[{"actual":["2.50","3/2","40.0"],"check":"control underdog","expected":["2.50","3/2","40.0"],"passed":true},{"actual":["3.00","2/1","66.7"],"check":"control favourite","expected":["1.50","1/2","66.7"],"passed":false},{"actual":["2.00","1/1","50.0"],"check":"boundary even money","expected":["2.00","1/1","50.0"],"passed":true},{"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":["9.00","8/1","88.9"],"check":"control half-up decimal","expected":["1.13","1/8","88.9"],"passed":false},{"actual":["2.05","21/20","51.2"],"check":"regression: favourite profit","expected":["1.95","20/21","51.2"],"passed":false},{"actual":["2.62","81/50","38.2"],"check":"variant scenario 1","expected":["2.62","81/50","38.2"],"passed":true},{"actual":["3.77","277/100","73.5"],"check":"variant scenario 2","expected":["1.36","100/277","73.5"],"passed":false}],"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\": [\"3.00\", \"2/1\", \"66.7\"], \"expected\": [\"1.50\", \"1/2\", \"66.7\"], \"passed\": false}, {\"check\": \"boundary even money\", \"actual\": [\"2.00\", \"1/1\", \"50.0\"], \"expected\": [\"2.00\", \"1/1\", \"50.0\"], \"passed\": true}, {\"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\": [\"9.00\", \"8/1\", \"88.9\"], \"expected\": [\"1.13\", \"1/8\", \"88.9\"], \"passed\": false}, {\"check\": \"regression: favourite profit\", \"actual\": [\"2.05\", \"21/20\", \"51.2\"], \"expected\": [\"1.95\", \"20/21\", \"51.2\"], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [\"2.62\", \"81/50\", \"38.2\"], \"expected\": [\"2.62\", \"81/50\", \"38.2\"], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [\"3.77\", \"277/100\", \"73.5\"], \"expected\": [\"1.36\", \"100/277\", \"73.5\"], \"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."}}