{"abstract":"Relative logarithm uses an inaccurate non-log1p branch.","category":"Floating-point arithmetic","checks":7,"contract":"Evaluate log1p(x)/x on x>-1 with continuous value one at zero. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","contract_signature":"x","evaluation_group":"s3-float-log1p-ratio","failed_approach":"The attempted local correction result=math.log(1+abs(x))/abs(x) still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-log1p-ratio-large-addition","id":"FA-16326","implementations":{"attempt":{"sha256":"0cb83a3ab60314b36e3ef6d3a1e0e2f1c1e32e701c671c4fe9683f84379c6167","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==0: return '1'\n        if abs(x)<1e-8:\n            result=1-x/2+x*x/3\n        else:\n            result=math.log(1+abs(x))/abs(x)\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('zero', solve(0.0), \"1\")\ncheck('tiny', solve(N*1e-10), render(1-N*1e-10/2))\ncheck('negative tiny', solve(-N*1e-10), render(1+N*1e-10/2))\ncheck('normal', solve(float(N)), render(math.log1p(N)/N))\ncheck('negative normal', solve(-0.125*N), render(math.log1p(-0.125*N)/(-0.125*N)))\ncheck('domain', solve(-1.0), \"domain\")\ncheck('transition', solve(1e-7), render(math.log1p(1e-7)/1e-7))\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":"333175b2e96e5e002516970fab113964f6f8c992fb31426a09a3f787731444c8","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==0: return '1'\n        if abs(x)<1e-8:\n            result=1-x/2+x*x/3\n        else:\n            result=math.log(1+x)/x\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('zero', solve(0.0), \"1\")\ncheck('tiny', solve(N*1e-10), render(1-N*1e-10/2))\ncheck('negative tiny', solve(-N*1e-10), render(1+N*1e-10/2))\ncheck('normal', solve(float(N)), render(math.log1p(N)/N))\ncheck('negative normal', solve(-0.125*N), render(math.log1p(-0.125*N)/(-0.125*N)))\ncheck('domain', solve(-1.0), \"domain\")\ncheck('transition', solve(1e-7), render(math.log1p(1e-7)/1e-7))\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-log1p-ratio-large-addition","generated_at":"2026-09-29T14:39:35.357058+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":"Relative logarithm uses an inaccurate non-log1p branch. The faulty expression is result=math.log(1+x)/x.","sha256":"93fea2c19930a358569733022f8889e34280a27a3e6421ebc479e9d4fbf61380","title":"Relative logarithm uses an inaccurate non-log1p branch · 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.145,"exit_code":1,"observations":[{"actual":"1","check":"zero","expected":"1","passed":true},{"actual":"0.99999999995","check":"tiny","expected":"0.99999999995","passed":true},{"actual":"1.0000000001","check":"negative tiny","expected":"1.0000000001","passed":true},{"actual":"0.69314718056","check":"normal","expected":"0.69314718056","passed":true},{"actual":"0.94226428525","check":"negative normal","expected":"1.068251141","passed":false},{"actual":"domain","check":"domain","expected":"domain","passed":true},{"actual":"0.99999995058","check":"transition","expected":"0.99999995","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"tiny\", \"actual\": \"0.99999999995\", \"expected\": \"0.99999999995\", \"passed\": true}, {\"check\": \"negative tiny\", \"actual\": \"1.0000000001\", \"expected\": \"1.0000000001\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"0.69314718056\", \"expected\": \"0.69314718056\", \"passed\": true}, {\"check\": \"negative normal\", \"actual\": \"0.94226428525\", \"expected\": \"1.068251141\", \"passed\": false}, {\"check\": \"domain\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"transition\", \"actual\": \"0.99999995058\", \"expected\": \"0.99999995\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.856,"exit_code":1,"observations":[{"actual":"1","check":"zero","expected":"1","passed":true},{"actual":"0.99999999995","check":"tiny","expected":"0.99999999995","passed":true},{"actual":"1.0000000001","check":"negative tiny","expected":"1.0000000001","passed":true},{"actual":"0.69314718056","check":"normal","expected":"0.69314718056","passed":true},{"actual":"1.068251141","check":"negative normal","expected":"1.068251141","passed":true},{"actual":"domain","check":"domain","expected":"domain","passed":true},{"actual":"0.99999995058","check":"transition","expected":"0.99999995","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"tiny\", \"actual\": \"0.99999999995\", \"expected\": \"0.99999999995\", \"passed\": true}, {\"check\": \"negative tiny\", \"actual\": \"1.0000000001\", \"expected\": \"1.0000000001\", \"passed\": true}, {\"check\": \"normal\", \"actual\": \"0.69314718056\", \"expected\": \"0.69314718056\", \"passed\": true}, {\"check\": \"negative normal\", \"actual\": \"1.068251141\", \"expected\": \"1.068251141\", \"passed\": true}, {\"check\": \"domain\", \"actual\": \"domain\", \"expected\": \"domain\", \"passed\": true}, {\"check\": \"transition\", \"actual\": \"0.99999995058\", \"expected\": \"0.99999995\", \"passed\": false}], \"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."}}