{"abstract":"Exponential divided difference subtracts close endpoint exponentials.","category":"Floating-point arithmetic","checks":7,"contract":"Evaluate (exp(b)-exp(a))/(b-a) with continuous value exp(a) when a=b. Fixture exponents are bounded; use expm1 for close endpoints. Finite results are rendered to eleven significant decimal digits; modeled domain violations and arithmetic errors are explicit strings.","evaluation_group":"s3-float-exp-divided-difference","failed_approach":"The attempted local correction ratio=(math.exp(d)-1)/d still violates the explicit regression fixtures.","family":"s3-floating_point_arithmetic-exp-divided-difference-close-subtraction","id":"FA-16986","implementations":{"attempt":{"sha256":"d3fac0ba3c1f67258aff8fd3af9bc8565da9bbdf92a535ee84fabb7a847bc94a","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(a,b):\n    try:\n        if a==b: return render(math.exp(a))\n        d=b-a\n        if abs(d)<1e-8:\n            ratio=(math.exp(d)-1)/d\n        else:\n            ratio=math.expm1(d)/d\n        result=math.exp(a)*ratio\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('coincident', solve(float(N),float(N)), render(math.exp(N)))\ncheck('near endpoints', solve(0.0,N*2.0**-60), \"1\")\ncheck('shifted near', solve(1.0,1.0+N*2.0**-50), render(math.exp(1)*(1+N*2.0**-50/2)))\ncheck('forward', solve(0.0,float(N)), render(math.expm1(N)/N))\ncheck('reverse', solve(float(N),0.0), render(math.expm1(N)/N))\ncheck('negative interval', solve(-float(N),0.0), render(-math.expm1(-N)/N))\ncheck('separated', solve(-1.0,1.0), render((math.exp(1)-math.exp(-1))/2))\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":"2d5cb6343954b4dfe287de302671c0f4fb4d41cc3538703eedd35feecf8c8988","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(a,b):\n    try:\n        if a==b: return render(math.exp(a))\n        d=b-a\n        if abs(d)<1e-8:\n            ratio=(math.exp(b)-math.exp(a))/(d*math.exp(a))\n        else:\n            ratio=math.expm1(d)/d\n        result=math.exp(a)*ratio\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('coincident', solve(float(N),float(N)), render(math.exp(N)))\ncheck('near endpoints', solve(0.0,N*2.0**-60), \"1\")\ncheck('shifted near', solve(1.0,1.0+N*2.0**-50), render(math.exp(1)*(1+N*2.0**-50/2)))\ncheck('forward', solve(0.0,float(N)), render(math.expm1(N)/N))\ncheck('reverse', solve(float(N),0.0), render(math.expm1(N)/N))\ncheck('negative interval', solve(-float(N),0.0), render(-math.expm1(-N)/N))\ncheck('separated', solve(-1.0,1.0), render((math.exp(1)-math.exp(-1))/2))\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":"d0aa9a6aaee7990745f7de88a4a7e7cc71bf1a0d09d5984b2b42c6414c39b116","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(a,b):\n    try:\n        if a==b: return render(math.exp(a))\n        d=b-a\n        if abs(d)<1e-8:\n            ratio=1+d/2+d*d/6\n        else:\n            ratio=math.expm1(d)/d\n        result=math.exp(a)*ratio\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('coincident', solve(float(N),float(N)), render(math.exp(N)))\ncheck('near endpoints', solve(0.0,N*2.0**-60), \"1\")\ncheck('shifted near', solve(1.0,1.0+N*2.0**-50), render(math.exp(1)*(1+N*2.0**-50/2)))\ncheck('forward', solve(0.0,float(N)), render(math.expm1(N)/N))\ncheck('reverse', solve(float(N),0.0), render(math.expm1(N)/N))\ncheck('negative interval', solve(-float(N),0.0), render(-math.expm1(-N)/N))\ncheck('separated', solve(-1.0,1.0), render((math.exp(1)-math.exp(-1))/2))\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-exp-divided-difference-close-subtraction","generated_at":"2026-09-29T14:39:41.750884+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 ratio=1+d/2+d*d/6.","root_cause":"Exponential divided difference subtracts close endpoint exponentials. The faulty expression is ratio=(math.exp(b)-math.exp(a))/(d*math.exp(a)).","sha256":"ebb234755eee86445f8585ec9b2778ef61131ad0db9e73755628a951802baf40","title":"Exponential divided difference subtracts close endpoint exponentials · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.942,"exit_code":1,"observations":[{"actual":"2.7182818285","check":"coincident","expected":"2.7182818285","passed":true},{"actual":"0","check":"near endpoints","expected":"1","passed":false},{"actual":"2.7182818285","check":"shifted near","expected":"2.7182818285","passed":true},{"actual":"1.7182818285","check":"forward","expected":"1.7182818285","passed":true},{"actual":"1.7182818285","check":"reverse","expected":"1.7182818285","passed":true},{"actual":"0.63212055883","check":"negative interval","expected":"0.63212055883","passed":true},{"actual":"1.1752011936","check":"separated","expected":"1.1752011936","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"coincident\", \"actual\": \"2.7182818285\", \"expected\": \"2.7182818285\", \"passed\": true}, {\"check\": \"near endpoints\", \"actual\": \"0\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"shifted near\", \"actual\": \"2.7182818285\", \"expected\": \"2.7182818285\", \"passed\": true}, {\"check\": \"forward\", \"actual\": \"1.7182818285\", \"expected\": \"1.7182818285\", \"passed\": true}, {\"check\": \"reverse\", \"actual\": \"1.7182818285\", \"expected\": \"1.7182818285\", \"passed\": true}, {\"check\": \"negative interval\", \"actual\": \"0.63212055883\", \"expected\": \"0.63212055883\", \"passed\": true}, {\"check\": \"separated\", \"actual\": \"1.1752011936\", \"expected\": \"1.1752011936\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.14,"exit_code":1,"observations":[{"actual":"2.7182818285","check":"coincident","expected":"2.7182818285","passed":true},{"actual":"0","check":"near endpoints","expected":"1","passed":false},{"actual":"3","check":"shifted near","expected":"2.7182818285","passed":false},{"actual":"1.7182818285","check":"forward","expected":"1.7182818285","passed":true},{"actual":"1.7182818285","check":"reverse","expected":"1.7182818285","passed":true},{"actual":"0.63212055883","check":"negative interval","expected":"0.63212055883","passed":true},{"actual":"1.1752011936","check":"separated","expected":"1.1752011936","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"coincident\", \"actual\": \"2.7182818285\", \"expected\": \"2.7182818285\", \"passed\": true}, {\"check\": \"near endpoints\", \"actual\": \"0\", \"expected\": \"1\", \"passed\": false}, {\"check\": \"shifted near\", \"actual\": \"3\", \"expected\": \"2.7182818285\", \"passed\": false}, {\"check\": \"forward\", \"actual\": \"1.7182818285\", \"expected\": \"1.7182818285\", \"passed\": true}, {\"check\": \"reverse\", \"actual\": \"1.7182818285\", \"expected\": \"1.7182818285\", \"passed\": true}, {\"check\": \"negative interval\", \"actual\": \"0.63212055883\", \"expected\": \"0.63212055883\", \"passed\": true}, {\"check\": \"separated\", \"actual\": \"1.1752011936\", \"expected\": \"1.1752011936\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.985,"exit_code":0,"observations":[{"actual":"2.7182818285","check":"coincident","expected":"2.7182818285","passed":true},{"actual":"1","check":"near endpoints","expected":"1","passed":true},{"actual":"2.7182818285","check":"shifted near","expected":"2.7182818285","passed":true},{"actual":"1.7182818285","check":"forward","expected":"1.7182818285","passed":true},{"actual":"1.7182818285","check":"reverse","expected":"1.7182818285","passed":true},{"actual":"0.63212055883","check":"negative interval","expected":"0.63212055883","passed":true},{"actual":"1.1752011936","check":"separated","expected":"1.1752011936","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"coincident\", \"actual\": \"2.7182818285\", \"expected\": \"2.7182818285\", \"passed\": true}, {\"check\": \"near endpoints\", \"actual\": \"1\", \"expected\": \"1\", \"passed\": true}, {\"check\": \"shifted near\", \"actual\": \"2.7182818285\", \"expected\": \"2.7182818285\", \"passed\": true}, {\"check\": \"forward\", \"actual\": \"1.7182818285\", \"expected\": \"1.7182818285\", \"passed\": true}, {\"check\": \"reverse\", \"actual\": \"1.7182818285\", \"expected\": \"1.7182818285\", \"passed\": true}, {\"check\": \"negative interval\", \"actual\": \"0.63212055883\", \"expected\": \"0.63212055883\", \"passed\": true}, {\"check\": \"separated\", \"actual\": \"1.1752011936\", \"expected\": \"1.1752011936\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}