{"abstract":"Base-two exponential flushes subnormal outputs.","category":"Floating-point arithmetic","checks":9,"contract":"Compute 2**x for finite x by separating its integer exponent from a bounded fractional exponential. Values x>=1024 return positive infinity; x<=-1075 return positive zero under nearest-even rounding. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","evaluation_group":"s3-float-exp2-split","failed_approach":"The attempted local correction if x < -1074: return '0' still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-exp2-split-premature-underflow","id":"FA-17171","implementations":{"attempt":{"sha256":"725c5655415afce33086a56d310311a85aa272ac132381aecf3c03495ab3f7e6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\ndef render(x):\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return '-infinity' if x<0 else '+infinity'\n    return format(x,'.11g')\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        if x>=1024: return '+infinity'\n        if x < -1074: return '0'\n        k=math.floor(x)\n        f=x-k\n        mantissa=2.0**f\n        result=math.ldexp(mantissa,k)\n        return render(result)\n    except (ValueError, OverflowError, ZeroDivisionError, TypeError):\n        return \"arithmetic-error\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('integer', solve(float(N)), render(2.0**N))\ncheck('negative integer', solve(-float(N)), render(2.0**(-N)))\ncheck('fraction', solve(N+0.5), render(2.0**(N+0.5)))\ncheck('large finite', solve(1023.0), render(2.0**1023))\ncheck('small subnormal', solve(-1074.0), render(math.ldexp(1.0,-1074)))\ncheck('subnormal half above', solve(-1074.5), render(math.ldexp(1.0,-1074)))\ncheck('underflow midpoint', solve(-1075.0), \"0\")\ncheck('overflow', solve(1024.0), \"+infinity\")\ncheck('negative fraction', solve(-N-0.5), render(2.0**(-N-0.5)))\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":"74900003a421b53a38392a25c3e512fda792e931927564e2b0d7cdd03cda98ca","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\ndef render(x):\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return '-infinity' if x<0 else '+infinity'\n    return format(x,'.11g')\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        if x>=1024: return '+infinity'\n        if x < -1022: return '0'\n        k=math.floor(x)\n        f=x-k\n        mantissa=2.0**f\n        result=math.ldexp(mantissa,k)\n        return render(result)\n    except (ValueError, OverflowError, ZeroDivisionError, TypeError):\n        return \"arithmetic-error\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('integer', solve(float(N)), render(2.0**N))\ncheck('negative integer', solve(-float(N)), render(2.0**(-N)))\ncheck('fraction', solve(N+0.5), render(2.0**(N+0.5)))\ncheck('large finite', solve(1023.0), render(2.0**1023))\ncheck('small subnormal', solve(-1074.0), render(math.ldexp(1.0,-1074)))\ncheck('subnormal half above', solve(-1074.5), render(math.ldexp(1.0,-1074)))\ncheck('underflow midpoint', solve(-1075.0), \"0\")\ncheck('overflow', solve(1024.0), \"+infinity\")\ncheck('negative fraction', solve(-N-0.5), render(2.0**(-N-0.5)))\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":"5749caa6ea68773b1a6004b0e04f393a13b630b1f8743461d05d60296d737bfc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\ndef render(x):\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return '-infinity' if x<0 else '+infinity'\n    return format(x,'.11g')\n\nN = 1\nobservations = []\ndef solve(x):\n    try:\n        if x>=1024: return '+infinity'\n        if x<=-1075: return '0'\n        k=math.floor(x)\n        f=x-k\n        mantissa=2.0**f\n        result=math.ldexp(mantissa,k)\n        return render(result)\n    except (ValueError, OverflowError, ZeroDivisionError, TypeError):\n        return \"arithmetic-error\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('integer', solve(float(N)), render(2.0**N))\ncheck('negative integer', solve(-float(N)), render(2.0**(-N)))\ncheck('fraction', solve(N+0.5), render(2.0**(N+0.5)))\ncheck('large finite', solve(1023.0), render(2.0**1023))\ncheck('small subnormal', solve(-1074.0), render(math.ldexp(1.0,-1074)))\ncheck('subnormal half above', solve(-1074.5), render(math.ldexp(1.0,-1074)))\ncheck('underflow midpoint', solve(-1075.0), \"0\")\ncheck('overflow', solve(1024.0), \"+infinity\")\ncheck('negative fraction', solve(-N-0.5), render(2.0**(-N-0.5)))\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":"Controlled binary64 or explicitly stipulated miniature format; no hardware exception flags or platform floating environment are modeled. 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":"s3-floating_point_arithmetic-exp2-split-premature-underflow","generated_at":"2026-09-29T14:39:43.671413+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"An offline floating representation model isolates a reproducible arithmetic fault.","repair":"Apply the contract at this fault site using if x<=-1075: return '0'.","root_cause":"Base-two exponential flushes subnormal outputs. The faulty expression is if x < -1022: return '0'.","sha256":"2d4179ada38de4157cc4c538c21b8aed9504ce1741c1eeda287e476fa92e36c8","title":"Base-two exponential flushes subnormal outputs · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.823,"exit_code":1,"observations":[{"actual":"2","check":"integer","expected":"2","passed":true},{"actual":"0.5","check":"negative integer","expected":"0.5","passed":true},{"actual":"2.8284271247","check":"fraction","expected":"2.8284271247","passed":true},{"actual":"8.9884656743e+307","check":"large finite","expected":"8.9884656743e+307","passed":true},{"actual":"4.9406564584e-324","check":"small subnormal","expected":"4.9406564584e-324","passed":true},{"actual":"0","check":"subnormal half above","expected":"4.9406564584e-324","passed":false},{"actual":"0","check":"underflow midpoint","expected":"0","passed":true},{"actual":"+infinity","check":"overflow","expected":"+infinity","passed":true},{"actual":"0.35355339059","check":"negative fraction","expected":"0.35355339059","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"integer\", \"actual\": \"2\", \"expected\": \"2\", \"passed\": true}, {\"check\": \"negative integer\", \"actual\": \"0.5\", \"expected\": \"0.5\", \"passed\": true}, {\"check\": \"fraction\", \"actual\": \"2.8284271247\", \"expected\": \"2.8284271247\", \"passed\": true}, {\"check\": \"large finite\", \"actual\": \"8.9884656743e+307\", \"expected\": \"8.9884656743e+307\", \"passed\": true}, {\"check\": \"small subnormal\", \"actual\": \"4.9406564584e-324\", \"expected\": \"4.9406564584e-324\", \"passed\": true}, {\"check\": \"subnormal half above\", \"actual\": \"0\", \"expected\": \"4.9406564584e-324\", \"passed\": false}, {\"check\": \"underflow midpoint\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"overflow\", \"actual\": \"+infinity\", \"expected\": \"+infinity\", \"passed\": true}, {\"check\": \"negative fraction\", \"actual\": \"0.35355339059\", \"expected\": \"0.35355339059\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.284,"exit_code":1,"observations":[{"actual":"2","check":"integer","expected":"2","passed":true},{"actual":"0.5","check":"negative integer","expected":"0.5","passed":true},{"actual":"2.8284271247","check":"fraction","expected":"2.8284271247","passed":true},{"actual":"8.9884656743e+307","check":"large finite","expected":"8.9884656743e+307","passed":true},{"actual":"0","check":"small subnormal","expected":"4.9406564584e-324","passed":false},{"actual":"0","check":"subnormal half above","expected":"4.9406564584e-324","passed":false},{"actual":"0","check":"underflow midpoint","expected":"0","passed":true},{"actual":"+infinity","check":"overflow","expected":"+infinity","passed":true},{"actual":"0.35355339059","check":"negative fraction","expected":"0.35355339059","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"integer\", \"actual\": \"2\", \"expected\": \"2\", \"passed\": true}, {\"check\": \"negative integer\", \"actual\": \"0.5\", \"expected\": \"0.5\", \"passed\": true}, {\"check\": \"fraction\", \"actual\": \"2.8284271247\", \"expected\": \"2.8284271247\", \"passed\": true}, {\"check\": \"large finite\", \"actual\": \"8.9884656743e+307\", \"expected\": \"8.9884656743e+307\", \"passed\": true}, {\"check\": \"small subnormal\", \"actual\": \"0\", \"expected\": \"4.9406564584e-324\", \"passed\": false}, {\"check\": \"subnormal half above\", \"actual\": \"0\", \"expected\": \"4.9406564584e-324\", \"passed\": false}, {\"check\": \"underflow midpoint\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"overflow\", \"actual\": \"+infinity\", \"expected\": \"+infinity\", \"passed\": true}, {\"check\": \"negative fraction\", \"actual\": \"0.35355339059\", \"expected\": \"0.35355339059\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.699,"exit_code":0,"observations":[{"actual":"2","check":"integer","expected":"2","passed":true},{"actual":"0.5","check":"negative integer","expected":"0.5","passed":true},{"actual":"2.8284271247","check":"fraction","expected":"2.8284271247","passed":true},{"actual":"8.9884656743e+307","check":"large finite","expected":"8.9884656743e+307","passed":true},{"actual":"4.9406564584e-324","check":"small subnormal","expected":"4.9406564584e-324","passed":true},{"actual":"4.9406564584e-324","check":"subnormal half above","expected":"4.9406564584e-324","passed":true},{"actual":"0","check":"underflow midpoint","expected":"0","passed":true},{"actual":"+infinity","check":"overflow","expected":"+infinity","passed":true},{"actual":"0.35355339059","check":"negative fraction","expected":"0.35355339059","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"integer\", \"actual\": \"2\", \"expected\": \"2\", \"passed\": true}, {\"check\": \"negative integer\", \"actual\": \"0.5\", \"expected\": \"0.5\", \"passed\": true}, {\"check\": \"fraction\", \"actual\": \"2.8284271247\", \"expected\": \"2.8284271247\", \"passed\": true}, {\"check\": \"large finite\", \"actual\": \"8.9884656743e+307\", \"expected\": \"8.9884656743e+307\", \"passed\": true}, {\"check\": \"small subnormal\", \"actual\": \"4.9406564584e-324\", \"expected\": \"4.9406564584e-324\", \"passed\": true}, {\"check\": \"subnormal half above\", \"actual\": \"4.9406564584e-324\", \"expected\": \"4.9406564584e-324\", \"passed\": true}, {\"check\": \"underflow midpoint\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"overflow\", \"actual\": \"+infinity\", \"expected\": \"+infinity\", \"passed\": true}, {\"check\": \"negative fraction\", \"actual\": \"0.35355339059\", \"expected\": \"0.35355339059\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}