{"abstract":"Inverse tangent replaces positive pole with zero.","category":"Floating-point arithmetic","checks":8,"contract":"Evaluate inverse hyperbolic tangent on [-1,1], with signed infinite endpoints and a domain marker outside. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","evaluation_group":"s3-float-atanh-stable","failed_approach":"The attempted local correction if x==1: return 'domain' still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-atanh-stable-endpoint-zero","id":"FA-16216","implementations":{"attempt":{"sha256":"e6f604acc30eb772b5f4af71f38ce20f200e3f3d4fdd512bdbf035cd47edad70","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 abs(x)>1: return 'domain'\n        if x==1: return 'domain'\n        if x==-1: return '-infinity'\n        if x==0: return render(x)\n        a=abs(x)\n        result=0.5*math.log1p(2*a/(1-a))\n        return render(math.copysign(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('tiny positive', solve(N*2.0**-60), render(N*2.0**-60))\ncheck('tiny negative', solve(-N*2.0**-60), render(-N*2.0**-60))\ncheck('normal', solve(0.125*N), render(math.atanh(0.125*N)))\ncheck('negative normal', solve(-0.125*N), render(math.atanh(-0.125*N)))\ncheck('positive endpoint', solve(1.0), \"+infinity\")\ncheck('negative endpoint', solve(-1.0), \"-infinity\")\ncheck('invalid', solve(1.0+N), \"domain\")\ncheck('negative zero', solve(-0.0), \"-0\")\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":"1cff1a418ded71fc3e37695d837ddc715a02cc786f98f376e9778b1ebf6b0963","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 abs(x)>1: return 'domain'\n        if x==1: return '0'\n        if x==-1: return '-infinity'\n        if x==0: return render(x)\n        a=abs(x)\n        result=0.5*math.log1p(2*a/(1-a))\n        return render(math.copysign(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('tiny positive', solve(N*2.0**-60), render(N*2.0**-60))\ncheck('tiny negative', solve(-N*2.0**-60), render(-N*2.0**-60))\ncheck('normal', solve(0.125*N), render(math.atanh(0.125*N)))\ncheck('negative normal', solve(-0.125*N), render(math.atanh(-0.125*N)))\ncheck('positive endpoint', solve(1.0), \"+infinity\")\ncheck('negative endpoint', solve(-1.0), \"-infinity\")\ncheck('invalid', solve(1.0+N), \"domain\")\ncheck('negative zero', solve(-0.0), \"-0\")\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":"a09958c68ceb529aadf5c8ff07b6328951ccdd723403737abd521529a5a576d4","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 abs(x)>1: return 'domain'\n        if x==1: return '+infinity'\n        if x==-1: return '-infinity'\n        if x==0: return render(x)\n        a=abs(x)\n        result=0.5*math.log1p(2*a/(1-a))\n        return render(math.copysign(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('tiny positive', solve(N*2.0**-60), render(N*2.0**-60))\ncheck('tiny negative', solve(-N*2.0**-60), render(-N*2.0**-60))\ncheck('normal', solve(0.125*N), render(math.atanh(0.125*N)))\ncheck('negative normal', solve(-0.125*N), render(math.atanh(-0.125*N)))\ncheck('positive endpoint', solve(1.0), \"+infinity\")\ncheck('negative endpoint', solve(-1.0), \"-infinity\")\ncheck('invalid', solve(1.0+N), \"domain\")\ncheck('negative zero', solve(-0.0), \"-0\")\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-atanh-stable-endpoint-zero","generated_at":"2026-09-29T14:39:34.089505+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 if x==1: return '+infinity'.","root_cause":"Inverse tangent replaces positive pole with zero. The faulty expression is if x==1: return '0'.","sha256":"3b6cb9ca132705bf03d96a5776774cd5ca85315e395eb513da98e94b20a15f30","title":"Inverse tangent replaces positive pole with zero · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.198,"exit_code":1,"observations":[{"actual":"8.6736173799e-19","check":"tiny positive","expected":"8.6736173799e-19","passed":true},{"actual":"-8.6736173799e-19","check":"tiny negative","expected":"-8.6736173799e-19","passed":true},{"actual":"0.12565721414","check":"normal","expected":"0.12565721414","passed":true},{"actual":"-0.12565721414","check":"negative normal","expected":"-0.12565721414","passed":true},{"actual":"domain","check":"positive endpoint","expected":"+infinity","passed":false},{"actual":"-infinity","check":"negative endpoint","expected":"-infinity","passed":true},{"actual":"domain","check":"invalid","expected":"domain","passed":true},{"actual":"-0","check":"negative zero","expected":"-0","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"tiny positive\", \"actual\": \"8.6736173799e-19\", \"expected\": \"8.6736173799e-19\", \"passed\": true}, {\"check\": \"tiny negative\", \"actual\": \"-8.6736173799e-19\", \"expected\": \"-8.6736173799e-19\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"0.12565721414\", \"expected\": \"0.12565721414\", \"passed\": true}, {\"check\": \"negative normal\", \"actual\": \"-0.12565721414\", \"expected\": \"-0.12565721414\", \"passed\": true}, {\"check\": \"positive endpoint\", \"actual\": \"domain\", \"expected\": \"+infinity\", \"passed\": false}, {\"check\": \"negative endpoint\", \"actual\": \"-infinity\", \"expected\": \"-infinity\", \"passed\": true}, {\"check\": \"invalid\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.26,"exit_code":1,"observations":[{"actual":"8.6736173799e-19","check":"tiny positive","expected":"8.6736173799e-19","passed":true},{"actual":"-8.6736173799e-19","check":"tiny negative","expected":"-8.6736173799e-19","passed":true},{"actual":"0.12565721414","check":"normal","expected":"0.12565721414","passed":true},{"actual":"-0.12565721414","check":"negative normal","expected":"-0.12565721414","passed":true},{"actual":"0","check":"positive endpoint","expected":"+infinity","passed":false},{"actual":"-infinity","check":"negative endpoint","expected":"-infinity","passed":true},{"actual":"domain","check":"invalid","expected":"domain","passed":true},{"actual":"-0","check":"negative zero","expected":"-0","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"tiny positive\", \"actual\": \"8.6736173799e-19\", \"expected\": \"8.6736173799e-19\", \"passed\": true}, {\"check\": \"tiny negative\", \"actual\": \"-8.6736173799e-19\", \"expected\": \"-8.6736173799e-19\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"0.12565721414\", \"expected\": \"0.12565721414\", \"passed\": true}, {\"check\": \"negative normal\", \"actual\": \"-0.12565721414\", \"expected\": \"-0.12565721414\", \"passed\": true}, {\"check\": \"positive endpoint\", \"actual\": \"0\", \"expected\": \"+infinity\", \"passed\": false}, {\"check\": \"negative endpoint\", \"actual\": \"-infinity\", \"expected\": \"-infinity\", \"passed\": true}, {\"check\": \"invalid\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.46,"exit_code":0,"observations":[{"actual":"8.6736173799e-19","check":"tiny positive","expected":"8.6736173799e-19","passed":true},{"actual":"-8.6736173799e-19","check":"tiny negative","expected":"-8.6736173799e-19","passed":true},{"actual":"0.12565721414","check":"normal","expected":"0.12565721414","passed":true},{"actual":"-0.12565721414","check":"negative normal","expected":"-0.12565721414","passed":true},{"actual":"+infinity","check":"positive endpoint","expected":"+infinity","passed":true},{"actual":"-infinity","check":"negative endpoint","expected":"-infinity","passed":true},{"actual":"domain","check":"invalid","expected":"domain","passed":true},{"actual":"-0","check":"negative zero","expected":"-0","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"tiny positive\", \"actual\": \"8.6736173799e-19\", \"expected\": \"8.6736173799e-19\", \"passed\": true}, {\"check\": \"tiny negative\", \"actual\": \"-8.6736173799e-19\", \"expected\": \"-8.6736173799e-19\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"0.12565721414\", \"expected\": \"0.12565721414\", \"passed\": true}, {\"check\": \"negative normal\", \"actual\": \"-0.12565721414\", \"expected\": \"-0.12565721414\", \"passed\": true}, {\"check\": \"positive endpoint\", \"actual\": \"+infinity\", \"expected\": \"+infinity\", \"passed\": true}, {\"check\": \"negative endpoint\", \"actual\": \"-infinity\", \"expected\": \"-infinity\", \"passed\": true}, {\"check\": \"invalid\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"-0\", \"expected\": \"-0\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}