{"abstract":"Inverse cosine forms x squared minus one near its branch point.","category":"Floating-point arithmetic","checks":8,"contract":"Evaluate inverse hyperbolic cosine for finite x>=1. Use logarithmic scaling for huge inputs and a log1p expression near one. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","evaluation_group":"s3-float-acosh-stable","failed_approach":"The attempted local correction result=math.log(x+math.sqrt(max(x*x-1,0))) still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-acosh-stable-near-one-cancellation","id":"FA-16256","implementations":{"attempt":{"sha256":"cd2e03be792f8e00fdc8d417d5648fb567045c8990f05b46bc1dfc873837b087","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 x<1: return 'domain'\n        if x==1: return '0'\n        if x>1e150:\n            result=math.log(x)+math.log(2)\n        else:\n            t=x-1\n            result=math.log(x+math.sqrt(max(x*x-1,0)))\n        return render(result)\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('fixed near one', solve(1+2.0**-50), render(math.acosh(1+2.0**-50)))\ncheck('near one', solve(1+N*2.0**-50), render(math.acosh(1+N*2.0**-50)))\ncheck('huge', solve(N*1e300), render(math.acosh(N*1e300)))\ncheck('normal', solve(1.0+N), render(math.acosh(1.0+N)))\ncheck('endpoint', solve(1.0), \"0\")\ncheck('invalid', solve(0.0), \"domain\")\ncheck('negative', solve(-float(N)), \"domain\")\ncheck('mid', solve(1.5), render(math.acosh(1.5)))\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":"4afe4760fc7d856dd07b3fe41eb4ddb6eef2e3e275f06233824b7ab26f2bc718","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 x<1: return 'domain'\n        if x==1: return '0'\n        if x>1e150:\n            result=math.log(x)+math.log(2)\n        else:\n            t=x-1\n            result=math.log(x+math.sqrt(x*x-1))\n        return render(result)\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('fixed near one', solve(1+2.0**-50), render(math.acosh(1+2.0**-50)))\ncheck('near one', solve(1+N*2.0**-50), render(math.acosh(1+N*2.0**-50)))\ncheck('huge', solve(N*1e300), render(math.acosh(N*1e300)))\ncheck('normal', solve(1.0+N), render(math.acosh(1.0+N)))\ncheck('endpoint', solve(1.0), \"0\")\ncheck('invalid', solve(0.0), \"domain\")\ncheck('negative', solve(-float(N)), \"domain\")\ncheck('mid', solve(1.5), render(math.acosh(1.5)))\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":"137bdac84d7b5baab52f9454e9710a9b859cddef10da835f53f1c155ed9692c1","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 x<1: return 'domain'\n        if x==1: return '0'\n        if x>1e150:\n            result=math.log(x)+math.log(2)\n        else:\n            t=x-1\n            result=math.log1p(t+math.sqrt(t*(x+1)))\n        return render(result)\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('fixed near one', solve(1+2.0**-50), render(math.acosh(1+2.0**-50)))\ncheck('near one', solve(1+N*2.0**-50), render(math.acosh(1+N*2.0**-50)))\ncheck('huge', solve(N*1e300), render(math.acosh(N*1e300)))\ncheck('normal', solve(1.0+N), render(math.acosh(1.0+N)))\ncheck('endpoint', solve(1.0), \"0\")\ncheck('invalid', solve(0.0), \"domain\")\ncheck('negative', solve(-float(N)), \"domain\")\ncheck('mid', solve(1.5), render(math.acosh(1.5)))\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-acosh-stable-near-one-cancellation","generated_at":"2026-09-29T14:39:34.705201+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 result=math.log1p(t+math.sqrt(t*(x+1))).","root_cause":"Inverse cosine forms x squared minus one near its branch point. The faulty expression is result=math.log(x+math.sqrt(x*x-1)).","sha256":"0fcd653666445fcb781351ba3f5e3a1a93edda6945a2ffab5e7c0296fca251a7","title":"Inverse cosine forms x squared minus one near its branch point · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.154,"exit_code":1,"observations":[{"actual":"4.2146848456e-08","check":"fixed near one","expected":"4.2146848511e-08","passed":false},{"actual":"4.2146848456e-08","check":"near one","expected":"4.2146848511e-08","passed":false},{"actual":"691.46867508","check":"huge","expected":"691.46867508","passed":true},{"actual":"1.3169578969","check":"normal","expected":"1.3169578969","passed":true},{"actual":"0","check":"endpoint","expected":"0","passed":true},{"actual":"domain","check":"invalid","expected":"domain","passed":true},{"actual":"domain","check":"negative","expected":"domain","passed":true},{"actual":"0.96242365012","check":"mid","expected":"0.96242365012","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixed near one\", \"actual\": \"4.2146848456e-08\", \"expected\": \"4.2146848511e-08\", \"passed\": false}, {\"check\": \"near one\", \"actual\": \"4.2146848456e-08\", \"expected\": \"4.2146848511e-08\", \"passed\": false}, {\"check\": \"huge\", \"actual\": \"691.46867508\", \"expected\": \"691.46867508\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"1.3169578969\", \"expected\": \"1.3169578969\", \"passed\": true}, {\"check\": \"endpoint\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"invalid\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"mid\", \"actual\": \"0.96242365012\", \"expected\": \"0.96242365012\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.276,"exit_code":1,"observations":[{"actual":"4.2146848456e-08","check":"fixed near one","expected":"4.2146848511e-08","passed":false},{"actual":"4.2146848456e-08","check":"near one","expected":"4.2146848511e-08","passed":false},{"actual":"691.46867508","check":"huge","expected":"691.46867508","passed":true},{"actual":"1.3169578969","check":"normal","expected":"1.3169578969","passed":true},{"actual":"0","check":"endpoint","expected":"0","passed":true},{"actual":"domain","check":"invalid","expected":"domain","passed":true},{"actual":"domain","check":"negative","expected":"domain","passed":true},{"actual":"0.96242365012","check":"mid","expected":"0.96242365012","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixed near one\", \"actual\": \"4.2146848456e-08\", \"expected\": \"4.2146848511e-08\", \"passed\": false}, {\"check\": \"near one\", \"actual\": \"4.2146848456e-08\", \"expected\": \"4.2146848511e-08\", \"passed\": false}, {\"check\": \"huge\", \"actual\": \"691.46867508\", \"expected\": \"691.46867508\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"1.3169578969\", \"expected\": \"1.3169578969\", \"passed\": true}, {\"check\": \"endpoint\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"invalid\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"mid\", \"actual\": \"0.96242365012\", \"expected\": \"0.96242365012\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.557,"exit_code":0,"observations":[{"actual":"4.2146848511e-08","check":"fixed near one","expected":"4.2146848511e-08","passed":true},{"actual":"4.2146848511e-08","check":"near one","expected":"4.2146848511e-08","passed":true},{"actual":"691.46867508","check":"huge","expected":"691.46867508","passed":true},{"actual":"1.3169578969","check":"normal","expected":"1.3169578969","passed":true},{"actual":"0","check":"endpoint","expected":"0","passed":true},{"actual":"domain","check":"invalid","expected":"domain","passed":true},{"actual":"domain","check":"negative","expected":"domain","passed":true},{"actual":"0.96242365012","check":"mid","expected":"0.96242365012","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixed near one\", \"actual\": \"4.2146848511e-08\", \"expected\": \"4.2146848511e-08\", \"passed\": true}, {\"check\": \"near one\", \"actual\": \"4.2146848511e-08\", \"expected\": \"4.2146848511e-08\", \"passed\": true}, {\"check\": \"huge\", \"actual\": \"691.46867508\", \"expected\": \"691.46867508\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"1.3169578969\", \"expected\": \"1.3169578969\", \"passed\": true}, {\"check\": \"endpoint\", \"actual\": \"0\", \"expected\": \"0\", \"passed\": true}, {\"check\": \"invalid\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"negative\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"mid\", \"actual\": \"0.96242365012\", \"expected\": \"0.96242365012\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}