{"abstract":"ULP scaling underflows below the subnormal spacing.","category":"Floating-point arithmetic","checks":9,"contract":"Return a finite binary64 ulp as a hex string; NaN maps to nan and either infinity maps to infinity. For subnormals and zero the ulp is the minimum positive subnormal.","evaluation_group":"s3-float-ulp-scale","failed_approach":"The attempted local correction e=max(e-53,-1022) still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-ulp-scale-subnormal-floor","id":"FA-15936","implementations":{"attempt":{"sha256":"e8d67f78095b0f336f753de5d2426120a7f382956d90d3b45a1a11aec428970f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\nN = 1\nobservations = []\ndef solve(bits):\n    x=struct.unpack('>d',bits.to_bytes(8,'big'))[0]\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return 'infinity'\n    x=abs(x)\n    if x == 0: return float.fromhex('0x0.0000000000001p-1022').hex()\n    m,e=math.frexp(x)\n    e=max(e-53,-1022)\n    return math.ldexp(1.0,e).hex()\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('zero', solve(0), '0x0.0000000000001p-1022')\ncheck('negative zero', solve(1<<63), '0x0.0000000000001p-1022')\ncheck('subnormal', solve(N), '0x0.0000000000001p-1022')\ncheck('power boundary', solve((1023+N)<<52), math.ldexp(1.0,N-52).hex())\ncheck('negative power', solve((1<<63)|((1023+N)<<52)), math.ldexp(1.0,N-52).hex())\ncheck('below power', solve(((1023+N)<<52)-1), math.ldexp(1.0,N-53).hex())\ncheck('infinity', solve(0x7ff0000000000000), 'infinity')\ncheck('nan', solve(0x7ff8000000000000|N), 'nan')\ncheck('maximum', solve(0x7fefffffffffffff), '0x1.0000000000000p+971')\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":"630d54d47a13f5119890de50bd5bbdb6697bee3e5fbb29f0b9a2df43137a535f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\nN = 1\nobservations = []\ndef solve(bits):\n    x=struct.unpack('>d',bits.to_bytes(8,'big'))[0]\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return 'infinity'\n    x=abs(x)\n    if x == 0: return float.fromhex('0x0.0000000000001p-1022').hex()\n    m,e=math.frexp(x)\n    e=e-53\n    return math.ldexp(1.0,e).hex()\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('zero', solve(0), '0x0.0000000000001p-1022')\ncheck('negative zero', solve(1<<63), '0x0.0000000000001p-1022')\ncheck('subnormal', solve(N), '0x0.0000000000001p-1022')\ncheck('power boundary', solve((1023+N)<<52), math.ldexp(1.0,N-52).hex())\ncheck('negative power', solve((1<<63)|((1023+N)<<52)), math.ldexp(1.0,N-52).hex())\ncheck('below power', solve(((1023+N)<<52)-1), math.ldexp(1.0,N-53).hex())\ncheck('infinity', solve(0x7ff0000000000000), 'infinity')\ncheck('nan', solve(0x7ff8000000000000|N), 'nan')\ncheck('maximum', solve(0x7fefffffffffffff), '0x1.0000000000000p+971')\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":"2d845f1224db3a884bf6208ebd3d50326ec5c32e26c953c914127acaad9dc1f2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\nN = 1\nobservations = []\ndef solve(bits):\n    x=struct.unpack('>d',bits.to_bytes(8,'big'))[0]\n    if math.isnan(x): return 'nan'\n    if math.isinf(x): return 'infinity'\n    x=abs(x)\n    if x == 0: return float.fromhex('0x0.0000000000001p-1022').hex()\n    m,e=math.frexp(x)\n    e=max(e-53,-1074)\n    return math.ldexp(1.0,e).hex()\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('zero', solve(0), '0x0.0000000000001p-1022')\ncheck('negative zero', solve(1<<63), '0x0.0000000000001p-1022')\ncheck('subnormal', solve(N), '0x0.0000000000001p-1022')\ncheck('power boundary', solve((1023+N)<<52), math.ldexp(1.0,N-52).hex())\ncheck('negative power', solve((1<<63)|((1023+N)<<52)), math.ldexp(1.0,N-52).hex())\ncheck('below power', solve(((1023+N)<<52)-1), math.ldexp(1.0,N-53).hex())\ncheck('infinity', solve(0x7ff0000000000000), 'infinity')\ncheck('nan', solve(0x7ff8000000000000|N), 'nan')\ncheck('maximum', solve(0x7fefffffffffffff), '0x1.0000000000000p+971')\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-ulp-scale-subnormal-floor","generated_at":"2026-09-29T14:39:31.496730+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 e=max(e-53,-1074).","root_cause":"ULP scaling underflows below the subnormal spacing. The faulty expression is e=e-53.","sha256":"b5e3eaac107a48f7f54801c2a4bf6ce44797c9577b90a1d821ac0bddb99c4fcc","title":"ULP scaling underflows below the subnormal spacing · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.194,"exit_code":1,"observations":[{"actual":"0x0.0000000000001p-1022","check":"zero","expected":"0x0.0000000000001p-1022","passed":true},{"actual":"0x0.0000000000001p-1022","check":"negative zero","expected":"0x0.0000000000001p-1022","passed":true},{"actual":"0x1.0000000000000p-1022","check":"subnormal","expected":"0x0.0000000000001p-1022","passed":false},{"actual":"0x1.0000000000000p-51","check":"power boundary","expected":"0x1.0000000000000p-51","passed":true},{"actual":"0x1.0000000000000p-51","check":"negative power","expected":"0x1.0000000000000p-51","passed":true},{"actual":"0x1.0000000000000p-52","check":"below power","expected":"0x1.0000000000000p-52","passed":true},{"actual":"infinity","check":"infinity","expected":"infinity","passed":true},{"actual":"nan","check":"nan","expected":"nan","passed":true},{"actual":"0x1.0000000000000p+971","check":"maximum","expected":"0x1.0000000000000p+971","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero\", \"actual\": \"0x0.0000000000001p-1022\", \"expected\": \"0x0.0000000000001p-1022\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"0x0.0000000000001p-1022\", \"expected\": \"0x0.0000000000001p-1022\", \"passed\": true}, {\"check\": \"subnormal\", \"actual\": \"0x1.0000000000000p-1022\", \"expected\": \"0x0.0000000000001p-1022\", \"passed\": false}, {\"check\": \"power boundary\", \"actual\": \"0x1.0000000000000p-51\", \"expected\": \"0x1.0000000000000p-51\", \"passed\": true}, {\"check\": \"negative power\", \"actual\": \"0x1.0000000000000p-51\", \"expected\": \"0x1.0000000000000p-51\", \"passed\": true}, {\"check\": \"below power\", \"actual\": \"0x1.0000000000000p-52\", \"expected\": \"0x1.0000000000000p-52\", \"passed\": true}, {\"check\": \"infinity\", \"actual\": \"infinity\", \"expected\": \"infinity\", \"passed\": true}, {\"check\": \"nan\", \"actual\": \"nan\", \"expected\": \"nan\", \"passed\": true}, {\"check\": \"maximum\", \"actual\": \"0x1.0000000000000p+971\", \"expected\": \"0x1.0000000000000p+971\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.39,"exit_code":1,"observations":[{"actual":"0x0.0000000000001p-1022","check":"zero","expected":"0x0.0000000000001p-1022","passed":true},{"actual":"0x0.0000000000001p-1022","check":"negative zero","expected":"0x0.0000000000001p-1022","passed":true},{"actual":"0x0.0p+0","check":"subnormal","expected":"0x0.0000000000001p-1022","passed":false},{"actual":"0x1.0000000000000p-51","check":"power boundary","expected":"0x1.0000000000000p-51","passed":true},{"actual":"0x1.0000000000000p-51","check":"negative power","expected":"0x1.0000000000000p-51","passed":true},{"actual":"0x1.0000000000000p-52","check":"below power","expected":"0x1.0000000000000p-52","passed":true},{"actual":"infinity","check":"infinity","expected":"infinity","passed":true},{"actual":"nan","check":"nan","expected":"nan","passed":true},{"actual":"0x1.0000000000000p+971","check":"maximum","expected":"0x1.0000000000000p+971","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero\", \"actual\": \"0x0.0000000000001p-1022\", \"expected\": \"0x0.0000000000001p-1022\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"0x0.0000000000001p-1022\", \"expected\": \"0x0.0000000000001p-1022\", \"passed\": true}, {\"check\": \"subnormal\", \"actual\": \"0x0.0p+0\", \"expected\": \"0x0.0000000000001p-1022\", \"passed\": false}, {\"check\": \"power boundary\", \"actual\": \"0x1.0000000000000p-51\", \"expected\": \"0x1.0000000000000p-51\", \"passed\": true}, {\"check\": \"negative power\", \"actual\": \"0x1.0000000000000p-51\", \"expected\": \"0x1.0000000000000p-51\", \"passed\": true}, {\"check\": \"below power\", \"actual\": \"0x1.0000000000000p-52\", \"expected\": \"0x1.0000000000000p-52\", \"passed\": true}, {\"check\": \"infinity\", \"actual\": \"infinity\", \"expected\": \"infinity\", \"passed\": true}, {\"check\": \"nan\", \"actual\": \"nan\", \"expected\": \"nan\", \"passed\": true}, {\"check\": \"maximum\", \"actual\": \"0x1.0000000000000p+971\", \"expected\": \"0x1.0000000000000p+971\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.931,"exit_code":0,"observations":[{"actual":"0x0.0000000000001p-1022","check":"zero","expected":"0x0.0000000000001p-1022","passed":true},{"actual":"0x0.0000000000001p-1022","check":"negative zero","expected":"0x0.0000000000001p-1022","passed":true},{"actual":"0x0.0000000000001p-1022","check":"subnormal","expected":"0x0.0000000000001p-1022","passed":true},{"actual":"0x1.0000000000000p-51","check":"power boundary","expected":"0x1.0000000000000p-51","passed":true},{"actual":"0x1.0000000000000p-51","check":"negative power","expected":"0x1.0000000000000p-51","passed":true},{"actual":"0x1.0000000000000p-52","check":"below power","expected":"0x1.0000000000000p-52","passed":true},{"actual":"infinity","check":"infinity","expected":"infinity","passed":true},{"actual":"nan","check":"nan","expected":"nan","passed":true},{"actual":"0x1.0000000000000p+971","check":"maximum","expected":"0x1.0000000000000p+971","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero\", \"actual\": \"0x0.0000000000001p-1022\", \"expected\": \"0x0.0000000000001p-1022\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"0x0.0000000000001p-1022\", \"expected\": \"0x0.0000000000001p-1022\", \"passed\": true}, {\"check\": \"subnormal\", \"actual\": \"0x0.0000000000001p-1022\", \"expected\": \"0x0.0000000000001p-1022\", \"passed\": true}, {\"check\": \"power boundary\", \"actual\": \"0x1.0000000000000p-51\", \"expected\": \"0x1.0000000000000p-51\", \"passed\": true}, {\"check\": \"negative power\", \"actual\": \"0x1.0000000000000p-51\", \"expected\": \"0x1.0000000000000p-51\", \"passed\": true}, {\"check\": \"below power\", \"actual\": \"0x1.0000000000000p-52\", \"expected\": \"0x1.0000000000000p-52\", \"passed\": true}, {\"check\": \"infinity\", \"actual\": \"infinity\", \"expected\": \"infinity\", \"passed\": true}, {\"check\": \"nan\", \"actual\": \"nan\", \"expected\": \"nan\", \"passed\": true}, {\"check\": \"maximum\", \"actual\": \"0x1.0000000000000p+971\", \"expected\": \"0x1.0000000000000p+971\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}