{"abstract":"Exponential relative increment uses a zero removable limit.","category":"Floating-point arithmetic","checks":7,"contract":"Evaluate expm1(x)/x with continuous value one at zero. Inputs are finite and have magnitude at most five. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","evaluation_group":"s3-float-expm1-ratio","failed_approach":"The attempted local correction if x==0: return 'arithmetic-error' still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-expm1-ratio-zero-limit","id":"FA-16281","implementations":{"attempt":{"sha256":"b8f352d85fd3c587d1181d37706a502220d525d9842b7e7a012d07700def553c","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==0: return 'arithmetic-error'\n        if abs(x)<1e-8:\n            result=1+x/2+x*x/6\n        else:\n            result=math.expm1(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('negative zero', solve(-0.0), \"1\")\ncheck('tiny', solve(N*1e-9), render(1+N*1e-9/2))\ncheck('negative tiny', solve(-N*1e-9), render(1-N*1e-9/2))\ncheck('moderate', solve(float(N)), render(math.expm1(N)/N))\ncheck('negative', solve(-float(N)), render(math.expm1(-N)/(-N)))\ncheck('transition', solve(1e-7), render(math.expm1(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":"9cb305bbf5c12f68026e551a91ddf180cf8784f4dea613155f6daaf5a18ee787","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==0: return '0'\n        if abs(x)<1e-8:\n            result=1+x/2+x*x/6\n        else:\n            result=math.expm1(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('negative zero', solve(-0.0), \"1\")\ncheck('tiny', solve(N*1e-9), render(1+N*1e-9/2))\ncheck('negative tiny', solve(-N*1e-9), render(1-N*1e-9/2))\ncheck('moderate', solve(float(N)), render(math.expm1(N)/N))\ncheck('negative', solve(-float(N)), render(math.expm1(-N)/(-N)))\ncheck('transition', solve(1e-7), render(math.expm1(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"},"fixed":{"sha256":"9dce028cca6c4133e78c46150381171f6ee740fae281905cee6ddfff09fdbb34","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==0: return '1'\n        if abs(x)<1e-8:\n            result=1+x/2+x*x/6\n        else:\n            result=math.expm1(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('negative zero', solve(-0.0), \"1\")\ncheck('tiny', solve(N*1e-9), render(1+N*1e-9/2))\ncheck('negative tiny', solve(-N*1e-9), render(1-N*1e-9/2))\ncheck('moderate', solve(float(N)), render(math.expm1(N)/N))\ncheck('negative', solve(-float(N)), render(math.expm1(-N)/(-N)))\ncheck('transition', solve(1e-7), render(math.expm1(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-expm1-ratio-zero-limit","generated_at":"2026-09-29T14:39:34.743963+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==0: return '1'.","root_cause":"Exponential relative increment uses a zero removable limit. The faulty expression is if x==0: return '0'.","sha256":"8b8aaf0253dea42598ab7dde3c8934b98e763df847f1f9c8bf44f12f069f90f4","title":"Exponential relative increment uses a zero removable limit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.017,"exit_code":1,"observations":[{"actual":"arithmetic-error","check":"zero","expected":"1","passed":false},{"actual":"arithmetic-error","check":"negative zero","expected":"1","passed":false},{"actual":"1.0000000005","check":"tiny","expected":"1.0000000005","passed":true},{"actual":"0.9999999995","check":"negative tiny","expected":"0.9999999995","passed":true},{"actual":"1.7182818285","check":"moderate","expected":"1.7182818285","passed":true},{"actual":"0.63212055883","check":"negative","expected":"0.63212055883","passed":true},{"actual":"1.00000005","check":"transition","expected":"1.00000005","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero\", \"actual\": \"arithmetic-error\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"negative zero\", \"actual\": \"arithmetic-error\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"tiny\", \"actual\": \"1.0000000005\", \"expected\": \"1.0000000005\", \"passed\": true}, {\"check\": \"negative tiny\", \"actual\": \"0.9999999995\", \"expected\": \"0.9999999995\", \"passed\": true}, {\"check\": \"moderate\", \"actual\": \"1.7182818285\", \"expected\": \"1.7182818285\", \"passed\": true}, {\"check\": \"negative\", \"actual\": \"0.63212055883\", \"expected\": \"0.63212055883\", \"passed\": true}, {\"check\": \"transition\", \"actual\": \"1.00000005\", \"expected\": \"1.00000005\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.199,"exit_code":1,"observations":[{"actual":"0","check":"zero","expected":"1","passed":false},{"actual":"0","check":"negative zero","expected":"1","passed":false},{"actual":"1.0000000005","check":"tiny","expected":"1.0000000005","passed":true},{"actual":"0.9999999995","check":"negative tiny","expected":"0.9999999995","passed":true},{"actual":"1.7182818285","check":"moderate","expected":"1.7182818285","passed":true},{"actual":"0.63212055883","check":"negative","expected":"0.63212055883","passed":true},{"actual":"1.00000005","check":"transition","expected":"1.00000005","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero\", \"actual\": \"0\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"negative zero\", \"actual\": \"0\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"tiny\", \"actual\": \"1.0000000005\", \"expected\": \"1.0000000005\", \"passed\": true}, {\"check\": \"negative tiny\", \"actual\": \"0.9999999995\", \"expected\": \"0.9999999995\", \"passed\": true}, {\"check\": \"moderate\", \"actual\": \"1.7182818285\", \"expected\": \"1.7182818285\", \"passed\": true}, {\"check\": \"negative\", \"actual\": \"0.63212055883\", \"expected\": \"0.63212055883\", \"passed\": true}, {\"check\": \"transition\", \"actual\": \"1.00000005\", \"expected\": \"1.00000005\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.698,"exit_code":0,"observations":[{"actual":"1","check":"zero","expected":"1","passed":true},{"actual":"1","check":"negative zero","expected":"1","passed":true},{"actual":"1.0000000005","check":"tiny","expected":"1.0000000005","passed":true},{"actual":"0.9999999995","check":"negative tiny","expected":"0.9999999995","passed":true},{"actual":"1.7182818285","check":"moderate","expected":"1.7182818285","passed":true},{"actual":"0.63212055883","check":"negative","expected":"0.63212055883","passed":true},{"actual":"1.00000005","check":"transition","expected":"1.00000005","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zero\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"negative zero\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"tiny\", \"actual\": \"1.0000000005\", \"expected\": \"1.0000000005\", \"passed\": true}, {\"check\": \"negative tiny\", \"actual\": \"0.9999999995\", \"expected\": \"0.9999999995\", \"passed\": true}, {\"check\": \"moderate\", \"actual\": \"1.7182818285\", \"expected\": \"1.7182818285\", \"passed\": true}, {\"check\": \"negative\", \"actual\": \"0.63212055883\", \"expected\": \"0.63212055883\", \"passed\": true}, {\"check\": \"transition\", \"actual\": \"1.00000005\", \"expected\": \"1.00000005\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}