{"abstract":"A 2.00 decimal price is shown as -1.00 in Malay format.","category":"Betting odds conversion","checks":10,"contract":"Convert a decimal price (> 1, else \"invalid\") to an Asian odds style. hk: d - 1. malay: d - 1 when d <= 2, else -1 / (d - 1). indo: d - 1 when d >= 2, else -1 / (d - 1). Other styles return \"invalid style\". Values are rounded half away from zero to two decimals and formatted with a leading \"-\" for negatives.","evaluation_group":"w2-odds-conversion-asian-odds-styles","failed_approach":"Widening the positive band to 2.01 shows 2.01 as a positive Malay price.","family":"w2-odds-conversion-asian-odds-styles-malay-evens-branch","id":"FA-84451","implementations":{"attempt":{"sha256":"48794cd63765a516e887b2cbb3b2bfc65816d01d7c63f61474e833264cb0505b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(decimal, style):\n    def fmt(x):\n        sign = '-' if x < 0 else ''\n        c = math.floor(abs(x) * 100 + Fraction(1, 2))\n        return sign + '%d.%02d' % (c // 100, c % 100)\n    d = Fraction(decimal)\n    if d <= 1:\n        return 'invalid'\n    if style == 'hk':\n        v = d - 1\n    elif style == 'malay':\n        v = d - 1 if d <= Fraction(201, 100) else -1 / (d - 1)\n    elif style == 'indo':\n        v = d - 1 if d >= 2 else -1 / (d - 1)\n    else:\n        return 'invalid style'\n    return fmt(v)\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 hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.01', 'malay'), '-0.99'),\n  ('variant scenario 1', ('3.58', 'indo'), '2.58'),\n  ('variant scenario 2', ('1.80', 'malay'), '0.80')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.005', 'malay'), '-1.00'),\n  ('variant scenario 1', ('1.25', 'malay'), '0.25'),\n  ('variant scenario 2', ('9.00', 'indo'), '8.00')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.005', 'malay'), '-1.00'),\n  ('variant scenario 1', ('1.00', 'us'), 'invalid'),\n  ('variant scenario 2', ('2.25', 'malay'), '-0.80')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.01', 'malay'), '-0.99'),\n  ('variant scenario 1', ('2.00', 'indo'), '1.00'),\n  ('variant scenario 2', ('1.00', 'us'), 'invalid')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.005', 'malay'), '-1.00'),\n  ('variant scenario 1', ('2.77', 'us'), 'invalid style'),\n  ('variant scenario 2', ('2.04', 'us'), 'invalid style')]]\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":"4d45a50450076d205704ef0b9a5012d19d8f608c4e89cd3497c47d4f4ec37053","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(decimal, style):\n    def fmt(x):\n        sign = '-' if x < 0 else ''\n        c = math.floor(abs(x) * 100 + Fraction(1, 2))\n        return sign + '%d.%02d' % (c // 100, c % 100)\n    d = Fraction(decimal)\n    if d <= 1:\n        return 'invalid'\n    if style == 'hk':\n        v = d - 1\n    elif style == 'malay':\n        v = d - 1 if d < 2 else -1 / (d - 1)\n    elif style == 'indo':\n        v = d - 1 if d >= 2 else -1 / (d - 1)\n    else:\n        return 'invalid style'\n    return fmt(v)\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 hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.01', 'malay'), '-0.99'),\n  ('variant scenario 1', ('3.58', 'indo'), '2.58'),\n  ('variant scenario 2', ('1.80', 'malay'), '0.80')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.005', 'malay'), '-1.00'),\n  ('variant scenario 1', ('1.25', 'malay'), '0.25'),\n  ('variant scenario 2', ('9.00', 'indo'), '8.00')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.005', 'malay'), '-1.00'),\n  ('variant scenario 1', ('1.00', 'us'), 'invalid'),\n  ('variant scenario 2', ('2.25', 'malay'), '-0.80')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.01', 'malay'), '-0.99'),\n  ('variant scenario 1', ('2.00', 'indo'), '1.00'),\n  ('variant scenario 2', ('1.00', 'us'), 'invalid')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.005', 'malay'), '-1.00'),\n  ('variant scenario 1', ('2.77', 'us'), 'invalid style'),\n  ('variant scenario 2', ('2.04', 'us'), 'invalid style')]]\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":"2340ddb9d9e4053d82f599ca1277b6caf440e19aa30485494bd4c7902d110bec","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nimport math\nN = 1\nobservations = []\ndef solve(decimal, style):\n    def fmt(x):\n        sign = '-' if x < 0 else ''\n        c = math.floor(abs(x) * 100 + Fraction(1, 2))\n        return sign + '%d.%02d' % (c // 100, c % 100)\n    d = Fraction(decimal)\n    if d <= 1:\n        return 'invalid'\n    if style == 'hk':\n        v = d - 1\n    elif style == 'malay':\n        v = d - 1 if d <= 2 else -1 / (d - 1)\n    elif style == 'indo':\n        v = d - 1 if d >= 2 else -1 / (d - 1)\n    else:\n        return 'invalid style'\n    return fmt(v)\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 hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.01', 'malay'), '-0.99'),\n  ('variant scenario 1', ('3.58', 'indo'), '2.58'),\n  ('variant scenario 2', ('1.80', 'malay'), '0.80')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.005', 'malay'), '-1.00'),\n  ('variant scenario 1', ('1.25', 'malay'), '0.25'),\n  ('variant scenario 2', ('9.00', 'indo'), '8.00')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.005', 'malay'), '-1.00'),\n  ('variant scenario 1', ('1.00', 'us'), 'invalid'),\n  ('variant scenario 2', ('2.25', 'malay'), '-0.80')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.01', 'malay'), '-0.99'),\n  ('variant scenario 1', ('2.00', 'indo'), '1.00'),\n  ('variant scenario 2', ('1.00', 'us'), 'invalid')],\n [('control hong kong', ('1.85', 'hk'), '0.85'),\n  ('control malay positive', ('1.80', 'malay'), '0.80'),\n  ('control malay negative', ('2.25', 'malay'), '-0.80'),\n  ('boundary malay evens', ('2.00', 'malay'), '1.00'),\n  ('control indo negative', ('1.80', 'indo'), '-1.25'),\n  ('boundary indo half rounds away', ('9.00', 'malay'), '-0.13'),\n  ('regression: malay evens branch', ('2.00', 'malay'), '1.00'),\n  ('regression: malay evens branch', ('2.005', 'malay'), '-1.00'),\n  ('variant scenario 1', ('2.77', 'us'), 'invalid style'),\n  ('variant scenario 2', ('2.04', 'us'), 'invalid style')]]\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-asian-odds-styles-malay-evens-branch","generated_at":"2026-09-29T14:50:31.082400+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Asian-facing sportsbooks show Hong Kong, Malay and Indonesian prices with sign conventions.","repair":"Use the positive branch for d <= 2.","root_cause":"The positive Malay branch uses d < 2.","sha256":"3d00c01ad4ff9fa13f886af2152b6bd8fd128761245c43bb4734438acbf92988","title":"Malay evens shown as -1.00 · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.322,"exit_code":1,"observations":[{"actual":"0.85","check":"control hong kong","expected":"0.85","passed":true},{"actual":"0.80","check":"control malay positive","expected":"0.80","passed":true},{"actual":"-0.80","check":"control malay negative","expected":"-0.80","passed":true},{"actual":"1.00","check":"boundary malay evens","expected":"1.00","passed":true},{"actual":"-1.25","check":"control indo negative","expected":"-1.25","passed":true},{"actual":"-0.13","check":"boundary indo half rounds away","expected":"-0.13","passed":true},{"actual":"1.00","check":"regression: malay evens branch","expected":"1.00","passed":true},{"actual":"1.01","check":"regression: malay evens branch","expected":"-0.99","passed":false},{"actual":"2.58","check":"variant scenario 1","expected":"2.58","passed":true},{"actual":"0.80","check":"variant scenario 2","expected":"0.80","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control hong kong\", \"actual\": \"0.85\", \"expected\": \"0.85\", \"passed\": true}, {\"check\": \"control malay positive\", \"actual\": \"0.80\", \"expected\": \"0.80\", \"passed\": true}, {\"check\": \"control malay negative\", \"actual\": \"-0.80\", \"expected\": \"-0.80\", \"passed\": true}, {\"check\": \"boundary malay evens\", \"actual\": \"1.00\", \"expected\": \"1.00\", \"passed\": true}, {\"check\": \"control indo negative\", \"actual\": \"-1.25\", \"expected\": \"-1.25\", \"passed\": true}, {\"check\": \"boundary indo half rounds away\", \"actual\": \"-0.13\", \"expected\": \"-0.13\", \"passed\": true}, {\"check\": \"regression: malay evens branch\", \"actual\": \"1.00\", \"expected\": \"1.00\", \"passed\": true}, {\"check\": \"regression: malay evens branch\", \"actual\": \"1.01\", \"expected\": \"-0.99\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"2.58\", \"expected\": \"2.58\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"0.80\", \"expected\": \"0.80\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.285,"exit_code":1,"observations":[{"actual":"0.85","check":"control hong kong","expected":"0.85","passed":true},{"actual":"0.80","check":"control malay positive","expected":"0.80","passed":true},{"actual":"-0.80","check":"control malay negative","expected":"-0.80","passed":true},{"actual":"-1.00","check":"boundary malay evens","expected":"1.00","passed":false},{"actual":"-1.25","check":"control indo negative","expected":"-1.25","passed":true},{"actual":"-0.13","check":"boundary indo half rounds away","expected":"-0.13","passed":true},{"actual":"-1.00","check":"regression: malay evens branch","expected":"1.00","passed":false},{"actual":"-0.99","check":"regression: malay evens branch","expected":"-0.99","passed":true},{"actual":"2.58","check":"variant scenario 1","expected":"2.58","passed":true},{"actual":"0.80","check":"variant scenario 2","expected":"0.80","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control hong kong\", \"actual\": \"0.85\", \"expected\": \"0.85\", \"passed\": true}, {\"check\": \"control malay positive\", \"actual\": \"0.80\", \"expected\": \"0.80\", \"passed\": true}, {\"check\": \"control malay negative\", \"actual\": \"-0.80\", \"expected\": \"-0.80\", \"passed\": true}, {\"check\": \"boundary malay evens\", \"actual\": \"-1.00\", \"expected\": \"1.00\", \"passed\": false}, {\"check\": \"control indo negative\", \"actual\": \"-1.25\", \"expected\": \"-1.25\", \"passed\": true}, {\"check\": \"boundary indo half rounds away\", \"actual\": \"-0.13\", \"expected\": \"-0.13\", \"passed\": true}, {\"check\": \"regression: malay evens branch\", \"actual\": \"-1.00\", \"expected\": \"1.00\", \"passed\": false}, {\"check\": \"regression: malay evens branch\", \"actual\": \"-0.99\", \"expected\": \"-0.99\", \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": \"2.58\", \"expected\": \"2.58\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"0.80\", \"expected\": \"0.80\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.413,"exit_code":0,"observations":[{"actual":"0.85","check":"control hong kong","expected":"0.85","passed":true},{"actual":"0.80","check":"control malay positive","expected":"0.80","passed":true},{"actual":"-0.80","check":"control malay negative","expected":"-0.80","passed":true},{"actual":"1.00","check":"boundary malay evens","expected":"1.00","passed":true},{"actual":"-1.25","check":"control indo negative","expected":"-1.25","passed":true},{"actual":"-0.13","check":"boundary indo half rounds away","expected":"-0.13","passed":true},{"actual":"1.00","check":"regression: malay evens branch","expected":"1.00","passed":true},{"actual":"-0.99","check":"regression: malay evens branch","expected":"-0.99","passed":true},{"actual":"2.58","check":"variant scenario 1","expected":"2.58","passed":true},{"actual":"0.80","check":"variant scenario 2","expected":"0.80","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control hong kong\", \"actual\": \"0.85\", \"expected\": \"0.85\", \"passed\": true}, {\"check\": \"control malay positive\", \"actual\": \"0.80\", \"expected\": \"0.80\", \"passed\": true}, {\"check\": \"control malay negative\", \"actual\": \"-0.80\", \"expected\": \"-0.80\", \"passed\": true}, {\"check\": \"boundary malay evens\", \"actual\": \"1.00\", \"expected\": \"1.00\", \"passed\": true}, {\"check\": \"control indo negative\", \"actual\": \"-1.25\", \"expected\": \"-1.25\", \"passed\": true}, {\"check\": \"boundary indo half rounds away\", \"actual\": \"-0.13\", \"expected\": \"-0.13\", \"passed\": true}, {\"check\": \"regression: malay evens branch\", \"actual\": \"1.00\", \"expected\": \"1.00\", \"passed\": true}, {\"check\": \"regression: malay evens branch\", \"actual\": \"-0.99\", \"expected\": \"-0.99\", \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": \"2.58\", \"expected\": \"2.58\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"0.80\", \"expected\": \"0.80\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}