{"abstract":"Quotients are wrong whenever the log difference is negative.","category":"Error-correcting codes","checks":8,"contract":"Table-driven GF(2^8) (polynomial 0x11D, generator 2) operations: \"div\" a/b (None for b = 0, 0 for a = 0 otherwise), \"inv\" 1/a (None for 0) and \"pow\" a^b for integer b >= 0 (0^0 = 1, 0^b = 0). EXP is extended to 510 entries so sums of logarithms need no reduction. Unknown ops return None.","evaluation_group":"w2-error_correcting_codes-gf256-log-tables","failed_approach":"Taking the absolute log difference computes b/a for half the inputs.","family":"w2-error_correcting_codes-gf256-log-tables-log-modulus","id":"FA-71971","implementations":{"attempt":{"sha256":"ff991d366f86c295efd6d501542b1631a72d5390c158b0521c55090210ff3d09","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(op, a, b):\n    EXP = [0] * 510\n    LOG = [0] * 256\n    x = 1\n    for i in range(255):\n        EXP[i] = x\n        LOG[x] = i\n        x <<= 1\n        if x & 0x100:\n            x ^= 0x11D\n    for i in range(255, 510):\n        EXP[i] = EXP[i - 255]\n    if op == 'div':\n        if b == 0:\n            return None\n        if a == 0:\n            return 0\n        return EXP[abs(LOG[a] - LOG[b])]\n    if op == 'inv':\n        if a == 0:\n            return None\n        return EXP[255 - LOG[a]]\n    if op == 'pow':\n        if a == 0:\n            return 0 if b > 0 else 1\n        return EXP[(LOG[a] * b) % 255]\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"div\", 1, 2]', ['div', 1, 2], 142], ['regression [\"div\", 70, 40]', ['div', 70, 40], 108], ['control [\"div\", 226, 96]', ['div', 226, 96], 190], ['control [\"div\", 65, 255]', ['div', 65, 255], 76], ['control [\"div\", 73, 232]', ['div', 73, 232], 21], ['control [\"div\", 255, 217]', ['div', 255, 217], 240], ['control [\"div\", 82, 3]', ['div', 82, 3], 197], ['control [\"inv\", 204, 0]', ['inv', 204, 0], 133]], [['regression [\"div\", 238, 211]', ['div', 238, 211], 155], ['regression [\"div\", 48, 99]', ['div', 48, 99], 118], ['control [\"inv\", 204, 0]', ['inv', 204, 0], 133], ['control [\"inv\", 143, 0]', ['inv', 143, 0], 245], ['control [\"inv\", 212, 0]', ['inv', 212, 0], 249], ['control [\"inv\", 188, 0]', ['inv', 188, 0], 149], ['control [\"inv\", 186, 0]', ['inv', 186, 0], 7], ['control [\"inv\", 215, 0]', ['inv', 215, 0], 214]], [['regression [\"div\", 2, 4]', ['div', 2, 4], 142], ['regression [\"div\", 1, 2]', ['div', 1, 2], 142], ['control [\"inv\", 215, 0]', ['inv', 215, 0], 214], ['control [\"pow\", 155, 166]', ['pow', 155, 166], 194], ['control [\"pow\", 28, 117]', ['pow', 28, 117], 100], ['control [\"pow\", 149, 57]', ['pow', 149, 57], 39], ['control [\"pow\", 63, 61]', ['pow', 63, 61], 49], ['control [\"pow\", 9, 596]', ['pow', 9, 596], 40]], [['regression [\"div\", 57, 11]', ['div', 57, 11], 179], ['regression [\"div\", 238, 211]', ['div', 238, 211], 155], ['control [\"pow\", 9, 596]', ['pow', 9, 596], 40], ['control [\"pow\", 55, 427]', ['pow', 55, 427], 28], ['control [\"div\", 0, 0]', ['div', 0, 0], None], ['control [\"div\", 0, 7]', ['div', 0, 7], 0], ['control [\"div\", 7, 0]', ['div', 7, 0], None], ['control [\"div\", 1, 1]', ['div', 1, 1], 1]], [['regression [\"div\", 152, 74]', ['div', 152, 74], 235], ['regression [\"div\", 2, 4]', ['div', 2, 4], 142], ['control [\"div\", 1, 1]', ['div', 1, 1], 1], ['control [\"inv\", 1, 0]', ['inv', 1, 0], 1], ['control [\"inv\", 0, 0]', ['inv', 0, 0], None], ['control [\"inv\", 2, 0]', ['inv', 2, 0], 142], ['control [\"pow\", 0, 0]', ['pow', 0, 0], 1], ['control [\"pow\", 0, 3]', ['pow', 0, 3], 0]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*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":"2d28c41a1f410649d3897af229bb3ca556262294080a523549fd67befd94f4cc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(op, a, b):\n    EXP = [0] * 510\n    LOG = [0] * 256\n    x = 1\n    for i in range(255):\n        EXP[i] = x\n        LOG[x] = i\n        x <<= 1\n        if x & 0x100:\n            x ^= 0x11D\n    for i in range(255, 510):\n        EXP[i] = EXP[i - 255]\n    if op == 'div':\n        if b == 0:\n            return None\n        if a == 0:\n            return 0\n        return EXP[(LOG[a] - LOG[b]) % 256]\n    if op == 'inv':\n        if a == 0:\n            return None\n        return EXP[255 - LOG[a]]\n    if op == 'pow':\n        if a == 0:\n            return 0 if b > 0 else 1\n        return EXP[(LOG[a] * b) % 255]\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"div\", 1, 2]', ['div', 1, 2], 142], ['regression [\"div\", 70, 40]', ['div', 70, 40], 108], ['control [\"div\", 226, 96]', ['div', 226, 96], 190], ['control [\"div\", 65, 255]', ['div', 65, 255], 76], ['control [\"div\", 73, 232]', ['div', 73, 232], 21], ['control [\"div\", 255, 217]', ['div', 255, 217], 240], ['control [\"div\", 82, 3]', ['div', 82, 3], 197], ['control [\"inv\", 204, 0]', ['inv', 204, 0], 133]], [['regression [\"div\", 238, 211]', ['div', 238, 211], 155], ['regression [\"div\", 48, 99]', ['div', 48, 99], 118], ['control [\"inv\", 204, 0]', ['inv', 204, 0], 133], ['control [\"inv\", 143, 0]', ['inv', 143, 0], 245], ['control [\"inv\", 212, 0]', ['inv', 212, 0], 249], ['control [\"inv\", 188, 0]', ['inv', 188, 0], 149], ['control [\"inv\", 186, 0]', ['inv', 186, 0], 7], ['control [\"inv\", 215, 0]', ['inv', 215, 0], 214]], [['regression [\"div\", 2, 4]', ['div', 2, 4], 142], ['regression [\"div\", 1, 2]', ['div', 1, 2], 142], ['control [\"inv\", 215, 0]', ['inv', 215, 0], 214], ['control [\"pow\", 155, 166]', ['pow', 155, 166], 194], ['control [\"pow\", 28, 117]', ['pow', 28, 117], 100], ['control [\"pow\", 149, 57]', ['pow', 149, 57], 39], ['control [\"pow\", 63, 61]', ['pow', 63, 61], 49], ['control [\"pow\", 9, 596]', ['pow', 9, 596], 40]], [['regression [\"div\", 57, 11]', ['div', 57, 11], 179], ['regression [\"div\", 238, 211]', ['div', 238, 211], 155], ['control [\"pow\", 9, 596]', ['pow', 9, 596], 40], ['control [\"pow\", 55, 427]', ['pow', 55, 427], 28], ['control [\"div\", 0, 0]', ['div', 0, 0], None], ['control [\"div\", 0, 7]', ['div', 0, 7], 0], ['control [\"div\", 7, 0]', ['div', 7, 0], None], ['control [\"div\", 1, 1]', ['div', 1, 1], 1]], [['regression [\"div\", 152, 74]', ['div', 152, 74], 235], ['regression [\"div\", 2, 4]', ['div', 2, 4], 142], ['control [\"div\", 1, 1]', ['div', 1, 1], 1], ['control [\"inv\", 1, 0]', ['inv', 1, 0], 1], ['control [\"inv\", 0, 0]', ['inv', 0, 0], None], ['control [\"inv\", 2, 0]', ['inv', 2, 0], 142], ['control [\"pow\", 0, 0]', ['pow', 0, 0], 1], ['control [\"pow\", 0, 3]', ['pow', 0, 3], 0]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*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":"c26e7701066d71130dec4f37ad57b63edeed047817efe6eb968b1055156facb0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(op, a, b):\n    EXP = [0] * 510\n    LOG = [0] * 256\n    x = 1\n    for i in range(255):\n        EXP[i] = x\n        LOG[x] = i\n        x <<= 1\n        if x & 0x100:\n            x ^= 0x11D\n    for i in range(255, 510):\n        EXP[i] = EXP[i - 255]\n    if op == 'div':\n        if b == 0:\n            return None\n        if a == 0:\n            return 0\n        return EXP[(LOG[a] - LOG[b]) % 255]\n    if op == 'inv':\n        if a == 0:\n            return None\n        return EXP[255 - LOG[a]]\n    if op == 'pow':\n        if a == 0:\n            return 0 if b > 0 else 1\n        return EXP[(LOG[a] * b) % 255]\n    return None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['regression [\"div\", 1, 2]', ['div', 1, 2], 142], ['regression [\"div\", 70, 40]', ['div', 70, 40], 108], ['control [\"div\", 226, 96]', ['div', 226, 96], 190], ['control [\"div\", 65, 255]', ['div', 65, 255], 76], ['control [\"div\", 73, 232]', ['div', 73, 232], 21], ['control [\"div\", 255, 217]', ['div', 255, 217], 240], ['control [\"div\", 82, 3]', ['div', 82, 3], 197], ['control [\"inv\", 204, 0]', ['inv', 204, 0], 133]], [['regression [\"div\", 238, 211]', ['div', 238, 211], 155], ['regression [\"div\", 48, 99]', ['div', 48, 99], 118], ['control [\"inv\", 204, 0]', ['inv', 204, 0], 133], ['control [\"inv\", 143, 0]', ['inv', 143, 0], 245], ['control [\"inv\", 212, 0]', ['inv', 212, 0], 249], ['control [\"inv\", 188, 0]', ['inv', 188, 0], 149], ['control [\"inv\", 186, 0]', ['inv', 186, 0], 7], ['control [\"inv\", 215, 0]', ['inv', 215, 0], 214]], [['regression [\"div\", 2, 4]', ['div', 2, 4], 142], ['regression [\"div\", 1, 2]', ['div', 1, 2], 142], ['control [\"inv\", 215, 0]', ['inv', 215, 0], 214], ['control [\"pow\", 155, 166]', ['pow', 155, 166], 194], ['control [\"pow\", 28, 117]', ['pow', 28, 117], 100], ['control [\"pow\", 149, 57]', ['pow', 149, 57], 39], ['control [\"pow\", 63, 61]', ['pow', 63, 61], 49], ['control [\"pow\", 9, 596]', ['pow', 9, 596], 40]], [['regression [\"div\", 57, 11]', ['div', 57, 11], 179], ['regression [\"div\", 238, 211]', ['div', 238, 211], 155], ['control [\"pow\", 9, 596]', ['pow', 9, 596], 40], ['control [\"pow\", 55, 427]', ['pow', 55, 427], 28], ['control [\"div\", 0, 0]', ['div', 0, 0], None], ['control [\"div\", 0, 7]', ['div', 0, 7], 0], ['control [\"div\", 7, 0]', ['div', 7, 0], None], ['control [\"div\", 1, 1]', ['div', 1, 1], 1]], [['regression [\"div\", 152, 74]', ['div', 152, 74], 235], ['regression [\"div\", 2, 4]', ['div', 2, 4], 142], ['control [\"div\", 1, 1]', ['div', 1, 1], 1], ['control [\"inv\", 1, 0]', ['inv', 1, 0], 1], ['control [\"inv\", 0, 0]', ['inv', 0, 0], None], ['control [\"inv\", 2, 0]', ['inv', 2, 0], 142], ['control [\"pow\", 0, 0]', ['pow', 0, 0], 1], ['control [\"pow\", 0, 3]', ['pow', 0, 3], 0]]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(*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":"A deterministic, bounded teaching model of the named code under the stated contract; not a production codec. 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-error_correcting_codes-gf256-log-tables-log-modulus","generated_at":"2026-09-29T14:48:34.345172+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Reed-Solomon decoders spend most time in log/antilog table lookups for division and inversion.","repair":"Reduce exponents modulo 255.","root_cause":"The log difference is reduced mod 256; the multiplicative group has order 255.","sha256":"6c6f51a986e88283cac6b34501d83221089bfa49248bbf7395bc3c13535e891d","title":"GF(256) division reduces logarithms modulo 256 · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":36.509,"exit_code":1,"observations":[{"actual":2,"check":"regression [\"div\", 1, 2]","expected":142,"passed":false},{"actual":32,"check":"regression [\"div\", 70, 40]","expected":108,"passed":false},{"actual":190,"check":"control [\"div\", 226, 96]","expected":190,"passed":true},{"actual":76,"check":"control [\"div\", 65, 255]","expected":76,"passed":true},{"actual":21,"check":"control [\"div\", 73, 232]","expected":21,"passed":true},{"actual":240,"check":"control [\"div\", 255, 217]","expected":240,"passed":true},{"actual":197,"check":"control [\"div\", 82, 3]","expected":197,"passed":true},{"actual":133,"check":"control [\"inv\", 204, 0]","expected":133,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"div\\\", 1, 2]\", \"actual\": 2, \"expected\": 142, \"passed\": false}, {\"check\": \"regression [\\\"div\\\", 70, 40]\", \"actual\": 32, \"expected\": 108, \"passed\": false}, {\"check\": \"control [\\\"div\\\", 226, 96]\", \"actual\": 190, \"expected\": 190, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 65, 255]\", \"actual\": 76, \"expected\": 76, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 73, 232]\", \"actual\": 21, \"expected\": 21, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 255, 217]\", \"actual\": 240, \"expected\": 240, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 82, 3]\", \"actual\": 197, \"expected\": 197, \"passed\": true}, {\"check\": \"control [\\\"inv\\\", 204, 0]\", \"actual\": 133, \"expected\": 133, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.569,"exit_code":1,"observations":[{"actual":1,"check":"regression [\"div\", 1, 2]","expected":142,"passed":false},{"actual":216,"check":"regression [\"div\", 70, 40]","expected":108,"passed":false},{"actual":190,"check":"control [\"div\", 226, 96]","expected":190,"passed":true},{"actual":76,"check":"control [\"div\", 65, 255]","expected":76,"passed":true},{"actual":21,"check":"control [\"div\", 73, 232]","expected":21,"passed":true},{"actual":240,"check":"control [\"div\", 255, 217]","expected":240,"passed":true},{"actual":197,"check":"control [\"div\", 82, 3]","expected":197,"passed":true},{"actual":133,"check":"control [\"inv\", 204, 0]","expected":133,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"div\\\", 1, 2]\", \"actual\": 1, \"expected\": 142, \"passed\": false}, {\"check\": \"regression [\\\"div\\\", 70, 40]\", \"actual\": 216, \"expected\": 108, \"passed\": false}, {\"check\": \"control [\\\"div\\\", 226, 96]\", \"actual\": 190, \"expected\": 190, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 65, 255]\", \"actual\": 76, \"expected\": 76, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 73, 232]\", \"actual\": 21, \"expected\": 21, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 255, 217]\", \"actual\": 240, \"expected\": 240, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 82, 3]\", \"actual\": 197, \"expected\": 197, \"passed\": true}, {\"check\": \"control [\\\"inv\\\", 204, 0]\", \"actual\": 133, \"expected\": 133, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.475,"exit_code":0,"observations":[{"actual":142,"check":"regression [\"div\", 1, 2]","expected":142,"passed":true},{"actual":108,"check":"regression [\"div\", 70, 40]","expected":108,"passed":true},{"actual":190,"check":"control [\"div\", 226, 96]","expected":190,"passed":true},{"actual":76,"check":"control [\"div\", 65, 255]","expected":76,"passed":true},{"actual":21,"check":"control [\"div\", 73, 232]","expected":21,"passed":true},{"actual":240,"check":"control [\"div\", 255, 217]","expected":240,"passed":true},{"actual":197,"check":"control [\"div\", 82, 3]","expected":197,"passed":true},{"actual":133,"check":"control [\"inv\", 204, 0]","expected":133,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression [\\\"div\\\", 1, 2]\", \"actual\": 142, \"expected\": 142, \"passed\": true}, {\"check\": \"regression [\\\"div\\\", 70, 40]\", \"actual\": 108, \"expected\": 108, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 226, 96]\", \"actual\": 190, \"expected\": 190, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 65, 255]\", \"actual\": 76, \"expected\": 76, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 73, 232]\", \"actual\": 21, \"expected\": 21, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 255, 217]\", \"actual\": 240, \"expected\": 240, \"passed\": true}, {\"check\": \"control [\\\"div\\\", 82, 3]\", \"actual\": 197, \"expected\": 197, \"passed\": true}, {\"check\": \"control [\\\"inv\\\", 204, 0]\", \"actual\": 133, \"expected\": 133, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}