{"abstract":"ULP distance validates only its left 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 not math.isfinite(a) or math.isinf(b): return None still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-ulp-distance-nonfinite-right","id":"FA-16086","implementations":{"attempt":{"sha256":"c1f004bcf525bff7e7b008d20dd61b4b269de8caa8fa513661b86ceb112f762d","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(a) or math.isinf(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":"75cc95054f78389fc2b56cd56037cb8858a086498fd53b1e33603dbabaa21fed","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(a): 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-right","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 left operand. The faulty expression is if not math.isfinite(a): return None.","sha256":"4eaaa1d9386b7fa8a95cb9049e9d57d719a0d3cb4db619e18ecd495b3bcbb3a6","title":"ULP distance validates only its left 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":40.064,"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":null,"check":"nan left","expected":null,"passed":true},{"actual":4613937818241073152,"check":"nan right","expected":null,"passed":false},{"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\": null, \"expected\": null, \"passed\": true}, {\"check\": \"nan right\", \"actual\": 4613937818241073152, \"expected\": null, \"passed\": false}, {\"check\": \"infinity\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.101,"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":null,"check":"nan left","expected":null,"passed":true},{"actual":4613937818241073152,"check":"nan right","expected":null,"passed":false},{"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\": null, \"expected\": null, \"passed\": true}, {\"check\": \"nan right\", \"actual\": 4613937818241073152, \"expected\": null, \"passed\": false}, {\"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."}}