{"abstract":"A 1.00 price raises a division error instead of returning invalid.","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\".","contract_signature":"decimal","evaluation_group":"w2-odds-conversion-decimal-to-american","failed_approach":"Rejecting only non-positive prices still divides by zero at 1.00.","family":"w2-odds-conversion-decimal-to-american-no-profit-guard","id":"FA-84356","implementations":{"attempt":{"sha256":"ce21bcf20e8663c424093c89fe1bbd94b5e864e5b52250be717c3cdb047c29e1","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 <= 0:\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: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('2.125',), '+113'),\n  ('variant scenario 2', ('2.56',), '+156')],\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: no profit guard', ('0.95',), 'invalid'),\n  ('regression: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('9.66',), '+866'),\n  ('variant scenario 2', ('3.95',), '+295')],\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: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('2.00',), '+100'),\n  ('variant scenario 2', ('1.82',), '-122')],\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: no profit guard', ('0.95',), 'invalid'),\n  ('regression: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('8.63',), '+763'),\n  ('variant scenario 2', ('1.916',), '-109')],\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: no profit guard', ('0.95',), 'invalid'),\n  ('regression: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('1.188',), '-532'),\n  ('variant scenario 2', ('3.17',), '+217')]]\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":"8eed7860d8dddc07be42c548be6b006a26398394524b80d775736d066981ee25","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: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('2.125',), '+113'),\n  ('variant scenario 2', ('2.56',), '+156')],\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: no profit guard', ('0.95',), 'invalid'),\n  ('regression: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('9.66',), '+866'),\n  ('variant scenario 2', ('3.95',), '+295')],\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: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('2.00',), '+100'),\n  ('variant scenario 2', ('1.82',), '-122')],\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: no profit guard', ('0.95',), 'invalid'),\n  ('regression: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('8.63',), '+763'),\n  ('variant scenario 2', ('1.916',), '-109')],\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: no profit guard', ('0.95',), 'invalid'),\n  ('regression: no profit guard', ('1.00',), 'invalid'),\n  ('variant scenario 1', ('1.188',), '-532'),\n  ('variant scenario 2', ('3.17',), '+217')]]\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-no-profit-guard","generated_at":"2026-09-29T14:50:30.056875+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.","root_cause":"The guard only rejects prices below 1.","sha256":"8ce0c5159e884f9ea6526528da63ced9327296e209a1941a210083c4f14879b8","title":"Decimal price of 1.00 not rejected · 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.296,"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":true},{"actual":"+101","check":"boundary half-cent rounds up","expected":"+101","passed":true},{"actual":"raised ZeroDivisionError","check":"boundary no-profit price","expected":"invalid","passed":false},{"actual":"-1250","check":"control short favourite","expected":"-1250","passed":true},{"actual":"raised ZeroDivisionError","check":"regression: no profit guard","expected":"invalid","passed":false},{"actual":"+113","check":"variant scenario 1","expected":"+113","passed":true},{"actual":"+156","check":"variant scenario 2","expected":"+156","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\": true}, {\"check\": \"boundary half-cent rounds up\", \"actual\": \"+101\", \"expected\": \"+101\", \"passed\": true}, {\"check\": \"boundary no-profit price\", \"actual\": \"raised ZeroDivisionError\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"control short favourite\", \"actual\": \"-1250\", \"expected\": \"-1250\", \"passed\": true}, {\"check\": \"regression: no profit guard\", \"actual\": \"raised ZeroDivisionError\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"+113\", \"expected\": \"+113\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"+156\", \"expected\": \"+156\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.734,"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":true},{"actual":"+101","check":"boundary half-cent rounds up","expected":"+101","passed":true},{"actual":"raised ZeroDivisionError","check":"boundary no-profit price","expected":"invalid","passed":false},{"actual":"-1250","check":"control short favourite","expected":"-1250","passed":true},{"actual":"raised ZeroDivisionError","check":"regression: no profit guard","expected":"invalid","passed":false},{"actual":"+113","check":"variant scenario 1","expected":"+113","passed":true},{"actual":"+156","check":"variant scenario 2","expected":"+156","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\": true}, {\"check\": \"boundary half-cent rounds up\", \"actual\": \"+101\", \"expected\": \"+101\", \"passed\": true}, {\"check\": \"boundary no-profit price\", \"actual\": \"raised ZeroDivisionError\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"control short favourite\", \"actual\": \"-1250\", \"expected\": \"-1250\", \"passed\": true}, {\"check\": \"regression: no profit guard\", \"actual\": \"raised ZeroDivisionError\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"+113\", \"expected\": \"+113\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"+156\", \"expected\": \"+156\", \"passed\": true}], \"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."}}