{"abstract":"Floating total-order sorting drops repeated encodings.","category":"Floating-point arithmetic","checks":9,"contract":"Sort unsigned binary64 encodings by the stipulated IEEE-style total encoding order: negative NaNs, negative infinity, negative finite, negative zero, positive zero, positive finite, positive infinity, positive NaNs. Within signed NaNs, reversing bits on negatives reverses quietness and payload ordering. Preserve all encodings.","evaluation_group":"s3-float-total-order","failed_approach":"The attempted local correction return list(dict.fromkeys(sorted(values,key=order))) still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-total-order-deduplication","id":"FA-16606","implementations":{"attempt":{"sha256":"b2037664180225323c0431deffdd1c01162f2c226d3a5043cd5a309d92c2a933","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\nN = 1\nobservations = []\ndef solve(values):\n    def order(bits):\n        return ((~bits)&((1<<64)-1)) if bits>>63 else (bits|(1<<63))\n    return list(dict.fromkeys(sorted(values,key=order)))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('zero order', solve([0,1<<63]), [1<<63,0])\ncheck('negative magnitudes', solve([0xbff0000000000000,0xc000000000000000]), [0xc000000000000000,0xbff0000000000000])\ncheck('positive magnitudes', solve([0x4000000000000000,0x3ff0000000000000]), [0x3ff0000000000000,0x4000000000000000])\ncheck('infinity and nan', solve([0x7ff8000000000000|N,0x7ff0000000000000]), [0x7ff0000000000000,0x7ff8000000000000|N])\ncheck('negative nan order', solve([0xfff0000000000000|N,0xfff8000000000000|N]), [0xfff8000000000000|N,0xfff0000000000000|N])\ncheck('positive payloads', solve([0x7ff8000000000064,0x7ff8000000000000|N]), [0x7ff8000000000000|N,0x7ff8000000000064])\ncheck('negative payloads', solve([0xfff8000000000000|N,0xfff8000000000064]), [0xfff8000000000064,0xfff8000000000000|N])\ncheck('mixed signs', solve([N,(1<<63)|N]), [(1<<63)|N,N])\ncheck('duplicates', solve([N,N]), [N,N])\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":"9a9a759f6ec597581d461f59bfa2b64a09de189ca4130441b7f020d70375c4b4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\nN = 1\nobservations = []\ndef solve(values):\n    def order(bits):\n        return ((~bits)&((1<<64)-1)) if bits>>63 else (bits|(1<<63))\n    return sorted(set(values),key=order)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('zero order', solve([0,1<<63]), [1<<63,0])\ncheck('negative magnitudes', solve([0xbff0000000000000,0xc000000000000000]), [0xc000000000000000,0xbff0000000000000])\ncheck('positive magnitudes', solve([0x4000000000000000,0x3ff0000000000000]), [0x3ff0000000000000,0x4000000000000000])\ncheck('infinity and nan', solve([0x7ff8000000000000|N,0x7ff0000000000000]), [0x7ff0000000000000,0x7ff8000000000000|N])\ncheck('negative nan order', solve([0xfff0000000000000|N,0xfff8000000000000|N]), [0xfff8000000000000|N,0xfff0000000000000|N])\ncheck('positive payloads', solve([0x7ff8000000000064,0x7ff8000000000000|N]), [0x7ff8000000000000|N,0x7ff8000000000064])\ncheck('negative payloads', solve([0xfff8000000000000|N,0xfff8000000000064]), [0xfff8000000000064,0xfff8000000000000|N])\ncheck('mixed signs', solve([N,(1<<63)|N]), [(1<<63)|N,N])\ncheck('duplicates', solve([N,N]), [N,N])\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":"63936deb9efcf833d064d15cba3f033e86676025c33703575b243fb2a1586d24","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nimport struct\nN = 1\nobservations = []\ndef solve(values):\n    def order(bits):\n        return ((~bits)&((1<<64)-1)) if bits>>63 else (bits|(1<<63))\n    return sorted(values,key=order)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('zero order', solve([0,1<<63]), [1<<63,0])\ncheck('negative magnitudes', solve([0xbff0000000000000,0xc000000000000000]), [0xc000000000000000,0xbff0000000000000])\ncheck('positive magnitudes', solve([0x4000000000000000,0x3ff0000000000000]), [0x3ff0000000000000,0x4000000000000000])\ncheck('infinity and nan', solve([0x7ff8000000000000|N,0x7ff0000000000000]), [0x7ff0000000000000,0x7ff8000000000000|N])\ncheck('negative nan order', solve([0xfff0000000000000|N,0xfff8000000000000|N]), [0xfff8000000000000|N,0xfff0000000000000|N])\ncheck('positive payloads', solve([0x7ff8000000000064,0x7ff8000000000000|N]), [0x7ff8000000000000|N,0x7ff8000000000064])\ncheck('negative payloads', solve([0xfff8000000000000|N,0xfff8000000000064]), [0xfff8000000000064,0xfff8000000000000|N])\ncheck('mixed signs', solve([N,(1<<63)|N]), [(1<<63)|N,N])\ncheck('duplicates', solve([N,N]), [N,N])\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-total-order-deduplication","generated_at":"2026-09-29T14:39:38.026243+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 return sorted(values,key=order).","root_cause":"Floating total-order sorting drops repeated encodings. The faulty expression is return sorted(set(values),key=order).","sha256":"fcf2a678dcc711395ed0f8f2c2771d509c959d9fbbdff99eeb99bf63f2475e9a","title":"Floating total-order sorting drops repeated encodings · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":44.18,"exit_code":1,"observations":[{"actual":[9223372036854775808,0],"check":"zero order","expected":[9223372036854775808,0],"passed":true},{"actual":[13835058055282163712,13830554455654793216],"check":"negative magnitudes","expected":[13835058055282163712,13830554455654793216],"passed":true},{"actual":[4607182418800017408,4611686018427387904],"check":"positive magnitudes","expected":[4607182418800017408,4611686018427387904],"passed":true},{"actual":[9218868437227405312,9221120237041090561],"check":"infinity and nan","expected":[9218868437227405312,9221120237041090561],"passed":true},{"actual":[18444492273895866369,18442240474082181121],"check":"negative nan order","expected":[18444492273895866369,18442240474082181121],"passed":true},{"actual":[9221120237041090561,9221120237041090660],"check":"positive payloads","expected":[9221120237041090561,9221120237041090660],"passed":true},{"actual":[18444492273895866468,18444492273895866369],"check":"negative payloads","expected":[18444492273895866468,18444492273895866369],"passed":true},{"actual":[9223372036854775809,1],"check":"mixed signs","expected":[9223372036854775809,1],"passed":true},{"actual":[1],"check":"duplicates","expected":[1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero order\", \"actual\": [9223372036854775808, 0], \"expected\": [9223372036854775808, 0], \"passed\": true}, {\"check\": \"negative magnitudes\", \"actual\": [13835058055282163712, 13830554455654793216], \"expected\": [13835058055282163712, 13830554455654793216], \"passed\": true}, {\"check\": \"positive magnitudes\", \"actual\": [4607182418800017408, 4611686018427387904], \"expected\": [4607182418800017408, 4611686018427387904], \"passed\": true}, {\"check\": \"infinity and nan\", \"actual\": [9218868437227405312, 9221120237041090561], \"expected\": [9218868437227405312, 9221120237041090561], \"passed\": true}, {\"check\": \"negative nan order\", \"actual\": [18444492273895866369, 18442240474082181121], \"expected\": [18444492273895866369, 18442240474082181121], \"passed\": true}, {\"check\": \"positive payloads\", \"actual\": [9221120237041090561, 9221120237041090660], \"expected\": [9221120237041090561, 9221120237041090660], \"passed\": true}, {\"check\": \"negative payloads\", \"actual\": [18444492273895866468, 18444492273895866369], \"expected\": [18444492273895866468, 18444492273895866369], \"passed\": true}, {\"check\": \"mixed signs\", \"actual\": [9223372036854775809, 1], \"expected\": [9223372036854775809, 1], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": [1], \"expected\": [1, 1], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.537,"exit_code":1,"observations":[{"actual":[9223372036854775808,0],"check":"zero order","expected":[9223372036854775808,0],"passed":true},{"actual":[13835058055282163712,13830554455654793216],"check":"negative magnitudes","expected":[13835058055282163712,13830554455654793216],"passed":true},{"actual":[4607182418800017408,4611686018427387904],"check":"positive magnitudes","expected":[4607182418800017408,4611686018427387904],"passed":true},{"actual":[9218868437227405312,9221120237041090561],"check":"infinity and nan","expected":[9218868437227405312,9221120237041090561],"passed":true},{"actual":[18444492273895866369,18442240474082181121],"check":"negative nan order","expected":[18444492273895866369,18442240474082181121],"passed":true},{"actual":[9221120237041090561,9221120237041090660],"check":"positive payloads","expected":[9221120237041090561,9221120237041090660],"passed":true},{"actual":[18444492273895866468,18444492273895866369],"check":"negative payloads","expected":[18444492273895866468,18444492273895866369],"passed":true},{"actual":[9223372036854775809,1],"check":"mixed signs","expected":[9223372036854775809,1],"passed":true},{"actual":[1],"check":"duplicates","expected":[1,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero order\", \"actual\": [9223372036854775808, 0], \"expected\": [9223372036854775808, 0], \"passed\": true}, {\"check\": \"negative magnitudes\", \"actual\": [13835058055282163712, 13830554455654793216], \"expected\": [13835058055282163712, 13830554455654793216], \"passed\": true}, {\"check\": \"positive magnitudes\", \"actual\": [4607182418800017408, 4611686018427387904], \"expected\": [4607182418800017408, 4611686018427387904], \"passed\": true}, {\"check\": \"infinity and nan\", \"actual\": [9218868437227405312, 9221120237041090561], \"expected\": [9218868437227405312, 9221120237041090561], \"passed\": true}, {\"check\": \"negative nan order\", \"actual\": [18444492273895866369, 18442240474082181121], \"expected\": [18444492273895866369, 18442240474082181121], \"passed\": true}, {\"check\": \"positive payloads\", \"actual\": [9221120237041090561, 9221120237041090660], \"expected\": [9221120237041090561, 9221120237041090660], \"passed\": true}, {\"check\": \"negative payloads\", \"actual\": [18444492273895866468, 18444492273895866369], \"expected\": [18444492273895866468, 18444492273895866369], \"passed\": true}, {\"check\": \"mixed signs\", \"actual\": [9223372036854775809, 1], \"expected\": [9223372036854775809, 1], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": [1], \"expected\": [1, 1], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.706,"exit_code":0,"observations":[{"actual":[9223372036854775808,0],"check":"zero order","expected":[9223372036854775808,0],"passed":true},{"actual":[13835058055282163712,13830554455654793216],"check":"negative magnitudes","expected":[13835058055282163712,13830554455654793216],"passed":true},{"actual":[4607182418800017408,4611686018427387904],"check":"positive magnitudes","expected":[4607182418800017408,4611686018427387904],"passed":true},{"actual":[9218868437227405312,9221120237041090561],"check":"infinity and nan","expected":[9218868437227405312,9221120237041090561],"passed":true},{"actual":[18444492273895866369,18442240474082181121],"check":"negative nan order","expected":[18444492273895866369,18442240474082181121],"passed":true},{"actual":[9221120237041090561,9221120237041090660],"check":"positive payloads","expected":[9221120237041090561,9221120237041090660],"passed":true},{"actual":[18444492273895866468,18444492273895866369],"check":"negative payloads","expected":[18444492273895866468,18444492273895866369],"passed":true},{"actual":[9223372036854775809,1],"check":"mixed signs","expected":[9223372036854775809,1],"passed":true},{"actual":[1,1],"check":"duplicates","expected":[1,1],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero order\", \"actual\": [9223372036854775808, 0], \"expected\": [9223372036854775808, 0], \"passed\": true}, {\"check\": \"negative magnitudes\", \"actual\": [13835058055282163712, 13830554455654793216], \"expected\": [13835058055282163712, 13830554455654793216], \"passed\": true}, {\"check\": \"positive magnitudes\", \"actual\": [4607182418800017408, 4611686018427387904], \"expected\": [4607182418800017408, 4611686018427387904], \"passed\": true}, {\"check\": \"infinity and nan\", \"actual\": [9218868437227405312, 9221120237041090561], \"expected\": [9218868437227405312, 9221120237041090561], \"passed\": true}, {\"check\": \"negative nan order\", \"actual\": [18444492273895866369, 18442240474082181121], \"expected\": [18444492273895866369, 18442240474082181121], \"passed\": true}, {\"check\": \"positive payloads\", \"actual\": [9221120237041090561, 9221120237041090660], \"expected\": [9221120237041090561, 9221120237041090660], \"passed\": true}, {\"check\": \"negative payloads\", \"actual\": [18444492273895866468, 18444492273895866369], \"expected\": [18444492273895866468, 18444492273895866369], \"passed\": true}, {\"check\": \"mixed signs\", \"actual\": [9223372036854775809, 1], \"expected\": [9223372036854775809, 1], \"passed\": true}, {\"check\": \"duplicates\", \"actual\": [1, 1], \"expected\": [1, 1], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}