{"abstract":"ULP distance validates only its right operand.","category":"Floating-point arithmetic","checks":9,"contract":"Distance between finite binary64 values in representable steps, treating the two zeros as a single position; NaN or infinity yields null. Negative and positive subnormals are adjacent through zero.","contract_signature":"a,b","evaluation_group":"s3-float-ulp-distance","failed_approach":"The attempted local correction if math.isinf(a) or not math.isfinite(b): return None still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-ulp-distance-nonfinite-left","id":"FA-16081","implementations":{"attempt":{"sha256":"de6e32076b162cf029649781fed1c8bd4153003e329153c7998204773baa06ad","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\nN = 1\nobservations = []\ndef solve(a,b):\n    if math.isinf(a) or not math.isfinite(b): return None\n    ab=int.from_bytes(struct.pack('>d',a),'big')\n    bb=int.from_bytes(struct.pack('>d',b),'big')\n    a_index=-(ab&((1<<63)-1)) if ab>>63 else ab\n    b_index=-(bb&((1<<63)-1)) if bb>>63 else bb\n    return abs(a_index-b_index)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('same', solve(float(N),float(N)), 0)\ncheck('zero signs', solve(-0.0,0.0), 0)\ncheck('negative adjacent', solve(-float(N),math.nextafter(-float(N),-math.inf)), 1)\ncheck('positive adjacent', solve(float(N),math.nextafter(float(N),math.inf)), 1)\ncheck('cross zero', solve(-math.ldexp(float(N),-1074),math.ldexp(float(N),-1074)), 2*N)\ncheck('reverse cross', solve(math.ldexp(float(N),-1074),-math.ldexp(float(N),-1074)), 2*N)\ncheck('nan left', solve(float(\"nan\"),1.0), None)\ncheck('nan right', solve(1.0,float(\"nan\")), None)\ncheck('infinity', solve(math.inf,math.inf), None)\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":"c63df46af981a5eda15e4bca9398af0062fc2822518f8c45a62288e49c3a726e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\nN = 1\nobservations = []\ndef solve(a,b):\n    if not math.isfinite(b): return None\n    ab=int.from_bytes(struct.pack('>d',a),'big')\n    bb=int.from_bytes(struct.pack('>d',b),'big')\n    a_index=-(ab&((1<<63)-1)) if ab>>63 else ab\n    b_index=-(bb&((1<<63)-1)) if bb>>63 else bb\n    return abs(a_index-b_index)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('same', solve(float(N),float(N)), 0)\ncheck('zero signs', solve(-0.0,0.0), 0)\ncheck('negative adjacent', solve(-float(N),math.nextafter(-float(N),-math.inf)), 1)\ncheck('positive adjacent', solve(float(N),math.nextafter(float(N),math.inf)), 1)\ncheck('cross zero', solve(-math.ldexp(float(N),-1074),math.ldexp(float(N),-1074)), 2*N)\ncheck('reverse cross', solve(math.ldexp(float(N),-1074),-math.ldexp(float(N),-1074)), 2*N)\ncheck('nan left', solve(float(\"nan\"),1.0), None)\ncheck('nan right', solve(1.0,float(\"nan\")), None)\ncheck('infinity', solve(math.inf,math.inf), None)\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-distance-nonfinite-left","generated_at":"2026-09-29T14:39:33.258410+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":"ULP distance validates only its right operand. The faulty expression is if not math.isfinite(b): return None.","sha256":"cb5be668f5f313175dd3bdd83519a29ac43bc08ee548f53236a867dc065b3678","title":"ULP distance validates only its right operand · 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":42.122,"exit_code":1,"observations":[{"actual":0,"check":"same","expected":0,"passed":true},{"actual":0,"check":"zero signs","expected":0,"passed":true},{"actual":1,"check":"negative adjacent","expected":1,"passed":true},{"actual":1,"check":"positive adjacent","expected":1,"passed":true},{"actual":2,"check":"cross zero","expected":2,"passed":true},{"actual":2,"check":"reverse cross","expected":2,"passed":true},{"actual":4613937818241073152,"check":"nan left","expected":null,"passed":false},{"actual":null,"check":"nan right","expected":null,"passed":true},{"actual":null,"check":"infinity","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"zero signs\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"negative adjacent\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"positive adjacent\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"cross zero\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"reverse cross\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"nan left\", \"actual\": 4613937818241073152, \"expected\": null, \"passed\": false}, {\"check\": \"nan right\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"infinity\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.951,"exit_code":1,"observations":[{"actual":0,"check":"same","expected":0,"passed":true},{"actual":0,"check":"zero signs","expected":0,"passed":true},{"actual":1,"check":"negative adjacent","expected":1,"passed":true},{"actual":1,"check":"positive adjacent","expected":1,"passed":true},{"actual":2,"check":"cross zero","expected":2,"passed":true},{"actual":2,"check":"reverse cross","expected":2,"passed":true},{"actual":4613937818241073152,"check":"nan left","expected":null,"passed":false},{"actual":null,"check":"nan right","expected":null,"passed":true},{"actual":null,"check":"infinity","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"zero signs\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"negative adjacent\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"positive adjacent\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"cross zero\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"reverse cross\", \"actual\": 2, \"expected\": 2, \"passed\": true}, {\"check\": \"nan left\", \"actual\": 4613937818241073152, \"expected\": null, \"passed\": false}, {\"check\": \"nan right\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"infinity\", \"actual\": null, \"expected\": null, \"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."}}