{"abstract":"A 2.00 price is displayed as -100 instead of +100.","category":"Betting odds conversion","checks":9,"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\".","evaluation_group":"w2-odds-conversion-decimal-to-american","failed_approach":"Special-casing evens as an unsigned \"100\" still violates the signed output format.","family":"w2-odds-conversion-decimal-to-american-evens-branch","id":"FA-84341","implementations":{"attempt":{"sha256":"bedbf93eb64d2b4e04b6f05ad81dd8e920309583484b7124ac95d159a396b073","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(decimal):\n    d = Fraction(decimal)\n    if d <= 1:\n        return 'invalid'\n    if d == 2:\n        return '100'\n    if d > 2:\n        v = (d - 1) * 100\n        sign = '+'\n    else:\n        v = 100 / (d - 1)\n        sign = '-'\n    n = math.floor(v + Fraction(1, 2))\n    return sign + str(n)\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', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('1.08',), '-1250'),\n  ('variant scenario 2', ('2.125',), '+113')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('6.11',), '+511'),\n  ('variant scenario 2', ('5.20',), '+420')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('6.85',), '+585'),\n  ('variant scenario 2', ('4.10',), '+310')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('6.35',), '+535'),\n  ('variant scenario 2', ('2.806',), '+181')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('8.36',), '+736'),\n  ('variant scenario 2', ('5.69',), '+469')]]\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":"817aae2462e04cfc0299f90d9fd7857ce33213dc83905f775b02a991d1263998","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(decimal):\n    d = Fraction(decimal)\n    if d <= 1:\n        return 'invalid'\n    if d > 2:\n        v = (d - 1) * 100\n        sign = '+'\n    else:\n        v = 100 / (d - 1)\n        sign = '-'\n    n = math.floor(v + Fraction(1, 2))\n    return sign + str(n)\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', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('1.08',), '-1250'),\n  ('variant scenario 2', ('2.125',), '+113')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('6.11',), '+511'),\n  ('variant scenario 2', ('5.20',), '+420')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('6.85',), '+585'),\n  ('variant scenario 2', ('4.10',), '+310')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('6.35',), '+535'),\n  ('variant scenario 2', ('2.806',), '+181')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('8.36',), '+736'),\n  ('variant scenario 2', ('5.69',), '+469')]]\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"},"fixed":{"sha256":"19d2d72f47fa6ac10e89a18b714ad0f3133ec5e16523d256996066d90deec00a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(decimal):\n    d = Fraction(decimal)\n    if d <= 1:\n        return 'invalid'\n    if d >= 2:\n        v = (d - 1) * 100\n        sign = '+'\n    else:\n        v = 100 / (d - 1)\n        sign = '-'\n    n = math.floor(v + Fraction(1, 2))\n    return sign + str(n)\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', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('1.08',), '-1250'),\n  ('variant scenario 2', ('2.125',), '+113')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('6.11',), '+511'),\n  ('variant scenario 2', ('5.20',), '+420')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('6.85',), '+585'),\n  ('variant scenario 2', ('4.10',), '+310')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('6.35',), '+535'),\n  ('variant scenario 2', ('2.806',), '+181')],\n [('control underdog', ('2.50',), '+150'),\n  ('control favourite', ('1.50',), '-200'),\n  ('boundary evens', ('2.00',), '+100'),\n  ('boundary half-cent rounds up', ('2.005',), '+101'),\n  ('boundary no-profit price', ('1.00',), 'invalid'),\n  ('control short favourite', ('1.08',), '-1250'),\n  ('regression: evens branch', ('2.00',), '+100'),\n  ('variant scenario 1', ('8.36',), '+736'),\n  ('variant scenario 2', ('5.69',), '+469')]]\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-decimal-to-american-evens-branch","generated_at":"2026-09-29T14:50:29.848129+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Sportsbooks display the same price in decimal and American formats and must agree at every boundary.","repair":"Use the positive branch for d >= 2.","root_cause":"The underdog branch requires d > 2, so evens falls through to the favourite formula.","sha256":"a5e4f6f663de3d110963f3193eec87254cd2f0ce9f9c6bb490a1758322481976","title":"Evens decimal price converted to a negative moneyline · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.139,"exit_code":1,"observations":[{"actual":"+150","check":"control underdog","expected":"+150","passed":true},{"actual":"-200","check":"control favourite","expected":"-200","passed":true},{"actual":"100","check":"boundary evens","expected":"+100","passed":false},{"actual":"+101","check":"boundary half-cent rounds up","expected":"+101","passed":true},{"actual":"invalid","check":"boundary no-profit price","expected":"invalid","passed":true},{"actual":"-1250","check":"control short favourite","expected":"-1250","passed":true},{"actual":"100","check":"regression: evens branch","expected":"+100","passed":false},{"actual":"-1250","check":"variant scenario 1","expected":"-1250","passed":true},{"actual":"+113","check":"variant scenario 2","expected":"+113","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control underdog\", \"actual\": \"+150\", \"expected\": \"+150\", \"passed\": true}, {\"check\": \"control favourite\", \"actual\": \"-200\", \"expected\": \"-200\", \"passed\": true}, {\"check\": \"boundary evens\", \"actual\": \"100\", \"expected\": \"+100\", \"passed\": false}, {\"check\": \"boundary half-cent rounds up\", \"actual\": \"+101\", \"expected\": \"+101\", \"passed\": true}, {\"check\": \"boundary no-profit price\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control short favourite\", \"actual\": \"-1250\", \"expected\": \"-1250\", \"passed\": true}, {\"check\": \"regression: evens branch\", \"actual\": \"100\", \"expected\": \"+100\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"-1250\", \"expected\": \"-1250\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"+113\", \"expected\": \"+113\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.953,"exit_code":1,"observations":[{"actual":"+150","check":"control underdog","expected":"+150","passed":true},{"actual":"-200","check":"control favourite","expected":"-200","passed":true},{"actual":"-100","check":"boundary evens","expected":"+100","passed":false},{"actual":"+101","check":"boundary half-cent rounds up","expected":"+101","passed":true},{"actual":"invalid","check":"boundary no-profit price","expected":"invalid","passed":true},{"actual":"-1250","check":"control short favourite","expected":"-1250","passed":true},{"actual":"-100","check":"regression: evens branch","expected":"+100","passed":false},{"actual":"-1250","check":"variant scenario 1","expected":"-1250","passed":true},{"actual":"+113","check":"variant scenario 2","expected":"+113","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control underdog\", \"actual\": \"+150\", \"expected\": \"+150\", \"passed\": true}, {\"check\": \"control favourite\", \"actual\": \"-200\", \"expected\": \"-200\", \"passed\": true}, {\"check\": \"boundary evens\", \"actual\": \"-100\", \"expected\": \"+100\", \"passed\": false}, {\"check\": \"boundary half-cent rounds up\", \"actual\": \"+101\", \"expected\": \"+101\", \"passed\": true}, {\"check\": \"boundary no-profit price\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control short favourite\", \"actual\": \"-1250\", \"expected\": \"-1250\", \"passed\": true}, {\"check\": \"regression: evens branch\", \"actual\": \"-100\", \"expected\": \"+100\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"-1250\", \"expected\": \"-1250\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"+113\", \"expected\": \"+113\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.529,"exit_code":0,"observations":[{"actual":"+150","check":"control underdog","expected":"+150","passed":true},{"actual":"-200","check":"control favourite","expected":"-200","passed":true},{"actual":"+100","check":"boundary evens","expected":"+100","passed":true},{"actual":"+101","check":"boundary half-cent rounds up","expected":"+101","passed":true},{"actual":"invalid","check":"boundary no-profit price","expected":"invalid","passed":true},{"actual":"-1250","check":"control short favourite","expected":"-1250","passed":true},{"actual":"+100","check":"regression: evens branch","expected":"+100","passed":true},{"actual":"-1250","check":"variant scenario 1","expected":"-1250","passed":true},{"actual":"+113","check":"variant scenario 2","expected":"+113","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control underdog\", \"actual\": \"+150\", \"expected\": \"+150\", \"passed\": true}, {\"check\": \"control favourite\", \"actual\": \"-200\", \"expected\": \"-200\", \"passed\": true}, {\"check\": \"boundary evens\", \"actual\": \"+100\", \"expected\": \"+100\", \"passed\": true}, {\"check\": \"boundary half-cent rounds up\", \"actual\": \"+101\", \"expected\": \"+101\", \"passed\": true}, {\"check\": \"boundary no-profit price\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"control short favourite\", \"actual\": \"-1250\", \"expected\": \"-1250\", \"passed\": true}, {\"check\": \"regression: evens branch\", \"actual\": \"+100\", \"expected\": \"+100\", \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": \"-1250\", \"expected\": \"-1250\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"+113\", \"expected\": \"+113\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}