{"abstract":"Reciprocal flushes subnormal results.","category":"Floating-point arithmetic","checks":9,"contract":"Compute the reciprocal of finite binary64 x using exponent decomposition. Signed zeros return signed infinity; overflow returns signed infinity and representable subnormal reciprocals are retained. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","contract_signature":"x","evaluation_group":"s3-float-reciprocal-scaled","failed_approach":"The attempted local correction return render(math.copysign(max(result,2.0**-1022),x)) still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-reciprocal-scaled-reciprocal-subnormal","id":"FA-17251","implementations":{"attempt":{"sha256":"bf2471824739251dfeda9b4cc839cb1d5031f9da2bf1526af4a6977b4e52e128","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==0: return '-infinity' if math.copysign(1.0,x)<0 else '+infinity'\n        m,e=math.frexp(abs(x))\n        fraction=1/m\n        try:\n            result=math.ldexp(fraction,-e)\n        except OverflowError:\n            return '-infinity' if x<0 else '+infinity'\n        return render(math.copysign(max(result,2.0**-1022),x))\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('positive ordinary', solve(float(N)), render(1/N))\ncheck('negative ordinary', solve(-float(N)), render(-1/N))\ncheck('huge', solve(1e308), render(1e-308))\ncheck('negative huge', solve(-1e308), render(-1e-308))\ncheck('tiny overflow', solve(math.ldexp(1.0,-1074)), \"+infinity\")\ncheck('negative tiny', solve(-math.ldexp(1.0,-1074)), \"-infinity\")\ncheck('positive zero', solve(0.0), \"+infinity\")\ncheck('negative zero', solve(-0.0), \"-infinity\")\ncheck('fraction', solve(0.125), \"8\")\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":"d7135728815a6137737750e6c933a82cff5cdc166ffc5cd57a2f436eec401f3d","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==0: return '-infinity' if math.copysign(1.0,x)<0 else '+infinity'\n        m,e=math.frexp(abs(x))\n        fraction=1/m\n        try:\n            result=math.ldexp(fraction,-e)\n        except OverflowError:\n            return '-infinity' if x<0 else '+infinity'\n        return render(math.copysign(0.0 if result<2.0**-1022 else result,x))\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('positive ordinary', solve(float(N)), render(1/N))\ncheck('negative ordinary', solve(-float(N)), render(-1/N))\ncheck('huge', solve(1e308), render(1e-308))\ncheck('negative huge', solve(-1e308), render(-1e-308))\ncheck('tiny overflow', solve(math.ldexp(1.0,-1074)), \"+infinity\")\ncheck('negative tiny', solve(-math.ldexp(1.0,-1074)), \"-infinity\")\ncheck('positive zero', solve(0.0), \"+infinity\")\ncheck('negative zero', solve(-0.0), \"-infinity\")\ncheck('fraction', solve(0.125), \"8\")\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-reciprocal-scaled-reciprocal-subnormal","generated_at":"2026-09-29T14:39:44.420928+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.","root_cause":"Reciprocal flushes subnormal results. The faulty expression is return render(math.copysign(0.0 if result<2.0**-1022 else result,x)).","sha256":"dac84a3f870e81495a21d1123b3385ba439fed5936d9aa6554817e21851dbf93","title":"Reciprocal flushes subnormal results · 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":44.311,"exit_code":1,"observations":[{"actual":"1","check":"positive ordinary","expected":"1","passed":true},{"actual":"-1","check":"negative ordinary","expected":"-1","passed":true},{"actual":"2.2250738585e-308","check":"huge","expected":"1e-308","passed":false},{"actual":"-2.2250738585e-308","check":"negative huge","expected":"-1e-308","passed":false},{"actual":"+infinity","check":"tiny overflow","expected":"+infinity","passed":true},{"actual":"-infinity","check":"negative tiny","expected":"-infinity","passed":true},{"actual":"+infinity","check":"positive zero","expected":"+infinity","passed":true},{"actual":"-infinity","check":"negative zero","expected":"-infinity","passed":true},{"actual":"8","check":"fraction","expected":"8","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"positive ordinary\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"negative ordinary\", \"actual\": \"-1\", \"expected\": \"-1\", \"passed\": true}, {\"check\": \"huge\", \"actual\": \"2.2250738585e-308\", \"expected\": \"1e-308\", \"passed\": false}, {\"check\": \"negative huge\", \"actual\": \"-2.2250738585e-308\", \"expected\": \"-1e-308\", \"passed\": false}, {\"check\": \"tiny overflow\", \"actual\": \"+infinity\", \"expected\": \"+infinity\", \"passed\": true}, {\"check\": \"negative tiny\", \"actual\": \"-infinity\", \"expected\": \"-infinity\", \"passed\": true}, {\"check\": \"positive zero\", \"actual\": \"+infinity\", \"expected\": \"+infinity\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-infinity\", \"expected\": \"-infinity\", \"passed\": true}, {\"check\": \"fraction\", \"actual\": \"8\", \"expected\": \"8\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.79,"exit_code":1,"observations":[{"actual":"1","check":"positive ordinary","expected":"1","passed":true},{"actual":"-1","check":"negative ordinary","expected":"-1","passed":true},{"actual":"0","check":"huge","expected":"1e-308","passed":false},{"actual":"-0","check":"negative huge","expected":"-1e-308","passed":false},{"actual":"+infinity","check":"tiny overflow","expected":"+infinity","passed":true},{"actual":"-infinity","check":"negative tiny","expected":"-infinity","passed":true},{"actual":"+infinity","check":"positive zero","expected":"+infinity","passed":true},{"actual":"-infinity","check":"negative zero","expected":"-infinity","passed":true},{"actual":"8","check":"fraction","expected":"8","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"positive ordinary\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"negative ordinary\", \"actual\": \"-1\", \"expected\": \"-1\", \"passed\": true}, {\"check\": \"huge\", \"actual\": \"0\", \"expected\": \"1e-308\", \"passed\": false}, {\"check\": \"negative huge\", \"actual\": \"-0\", \"expected\": \"-1e-308\", \"passed\": false}, {\"check\": \"tiny overflow\", \"actual\": \"+infinity\", \"expected\": \"+infinity\", \"passed\": true}, {\"check\": \"negative tiny\", \"actual\": \"-infinity\", \"expected\": \"-infinity\", \"passed\": true}, {\"check\": \"positive zero\", \"actual\": \"+infinity\", \"expected\": \"+infinity\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-infinity\", \"expected\": \"-infinity\", \"passed\": true}, {\"check\": \"fraction\", \"actual\": \"8\", \"expected\": \"8\", \"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."}}