{"abstract":"A valid chosen value is replaced by an error from an unchosen branch.","category":"Spreadsheet calculation semantics","checks":6,"contract":"Each branch is a [numerator,denominator] integer division expression with both operands in the inclusive range -1000000 through 1000000. IF evaluates only its chosen branch, returning a binary floating-point quotient or #DIV/0! when its selected denominator is zero. This bounded model excludes overflow.","evaluation_group":"model-83f89009d55ceada","failed_approach":"Suppressing every branch error also suppresses an error in the selected branch.","family":"z-spreadsheets-if-unused-error","id":"FA-11366","implementations":{"attempt":{"sha256":"e7fc2dec2eab83731cb18b08bfc245fedff2f55a6685f5d5b99f3212e214b78d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(condition, yes, no):\n    branch = yes if condition else no\n    return 0 if branch[1] == 0 else branch[0]/branch[1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unused false branch error', solve(True,[N,1],[1,0]), N)\ncheck('unused true branch error', solve(False,[1,0],[N,1]), N)\ncheck('selected true error', solve(True,[N,0],[1,1]), '#DIV/0!')\ncheck('selected false error', solve(False,[1,1],[N,0]), '#DIV/0!')\ncheck('zero quotient', solve(True,[0,N],[1,0]), 0)\ncheck('ordinary false choice', solve(False,[8,2],[-N,1]), -N)\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":"9309c1d79896e4eab342538e61cd95a644ef7e1ec043421839029056ed423d66","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(condition, yes, no):\n    return '#DIV/0!' if yes[1] == 0 or no[1] == 0 else (yes[0]/yes[1] if condition else no[0]/no[1])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unused false branch error', solve(True,[N,1],[1,0]), N)\ncheck('unused true branch error', solve(False,[1,0],[N,1]), N)\ncheck('selected true error', solve(True,[N,0],[1,1]), '#DIV/0!')\ncheck('selected false error', solve(False,[1,1],[N,0]), '#DIV/0!')\ncheck('zero quotient', solve(True,[0,N],[1,0]), 0)\ncheck('ordinary false choice', solve(False,[8,2],[-N,1]), -N)\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":"2a5047a6f178b5e480169b8e2f3f6704a2b905d0e0e899147526e42d44082dc7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(condition, yes, no):\n    branch = yes if condition else no\n    return '#DIV/0!' if branch[1] == 0 else branch[0]/branch[1]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unused false branch error', solve(True,[N,1],[1,0]), N)\ncheck('unused true branch error', solve(False,[1,0],[N,1]), N)\ncheck('selected true error', solve(True,[N,0],[1,1]), '#DIV/0!')\ncheck('selected false error', solve(False,[1,1],[N,0]), '#DIV/0!')\ncheck('zero quotient', solve(True,[0,N],[1,0]), 0)\ncheck('ordinary false choice', solve(False,[8,2],[-N,1]), -N)\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":" 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":"z-spreadsheets-if-unused-error","generated_at":"2026-09-29T14:38:47.356492+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This isolated spreadsheet model makes cell semantics explicit; it does not claim compatibility with every workbook engine.","repair":"Evaluate only the selected branch.","root_cause":"The evaluator evaluates both IF branches eagerly.","sha256":"d8cca741556fe0fdc16e0167db3713057c0e3228e0b84e18aab8385d988e8e32","title":"An unused IF branch propagates its error · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.84,"exit_code":1,"observations":[{"actual":1.0,"check":"unused false branch error","expected":1,"passed":true},{"actual":1.0,"check":"unused true branch error","expected":1,"passed":true},{"actual":0,"check":"selected true error","expected":"#DIV/0!","passed":false},{"actual":0,"check":"selected false error","expected":"#DIV/0!","passed":false},{"actual":0.0,"check":"zero quotient","expected":0,"passed":true},{"actual":-1.0,"check":"ordinary false choice","expected":-1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unused false branch error\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"unused true branch error\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"selected true error\", \"actual\": 0, \"expected\": \"#DIV/0!\", \"passed\": false}, {\"check\": \"selected false error\", \"actual\": 0, \"expected\": \"#DIV/0!\", \"passed\": false}, {\"check\": \"zero quotient\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"ordinary false choice\", \"actual\": -1.0, \"expected\": -1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.308,"exit_code":1,"observations":[{"actual":"#DIV/0!","check":"unused false branch error","expected":1,"passed":false},{"actual":"#DIV/0!","check":"unused true branch error","expected":1,"passed":false},{"actual":"#DIV/0!","check":"selected true error","expected":"#DIV/0!","passed":true},{"actual":"#DIV/0!","check":"selected false error","expected":"#DIV/0!","passed":true},{"actual":"#DIV/0!","check":"zero quotient","expected":0,"passed":false},{"actual":-1.0,"check":"ordinary false choice","expected":-1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unused false branch error\", \"actual\": \"#DIV/0!\", \"expected\": 1, \"passed\": false}, {\"check\": \"unused true branch error\", \"actual\": \"#DIV/0!\", \"expected\": 1, \"passed\": false}, {\"check\": \"selected true error\", \"actual\": \"#DIV/0!\", \"expected\": \"#DIV/0!\", \"passed\": true}, {\"check\": \"selected false error\", \"actual\": \"#DIV/0!\", \"expected\": \"#DIV/0!\", \"passed\": true}, {\"check\": \"zero quotient\", \"actual\": \"#DIV/0!\", \"expected\": 0, \"passed\": false}, {\"check\": \"ordinary false choice\", \"actual\": -1.0, \"expected\": -1, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.442,"exit_code":0,"observations":[{"actual":1.0,"check":"unused false branch error","expected":1,"passed":true},{"actual":1.0,"check":"unused true branch error","expected":1,"passed":true},{"actual":"#DIV/0!","check":"selected true error","expected":"#DIV/0!","passed":true},{"actual":"#DIV/0!","check":"selected false error","expected":"#DIV/0!","passed":true},{"actual":0.0,"check":"zero quotient","expected":0,"passed":true},{"actual":-1.0,"check":"ordinary false choice","expected":-1,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unused false branch error\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"unused true branch error\", \"actual\": 1.0, \"expected\": 1, \"passed\": true}, {\"check\": \"selected true error\", \"actual\": \"#DIV/0!\", \"expected\": \"#DIV/0!\", \"passed\": true}, {\"check\": \"selected false error\", \"actual\": \"#DIV/0!\", \"expected\": \"#DIV/0!\", \"passed\": true}, {\"check\": \"zero quotient\", \"actual\": 0.0, \"expected\": 0, \"passed\": true}, {\"check\": \"ordinary false choice\", \"actual\": -1.0, \"expected\": -1, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}