FA-16981 / Floating-point arithmetic / Open access
Exponential divided difference sets its coincident limit to zero · case 01
Exponential divided difference sets its coincident limit to zero.
ROOT CAUSE
Exponential divided difference sets its coincident limit to zero. The faulty expression is if a==b: return "0".
THE FAILURE
Exponential divided difference sets its coincident limit to zero. The faulty expression is if a==b: return "0".
Unsuccessful approach: The attempted local correction if a==b: return "1" still violates the explicit regression fixtures.
Case 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.
Why this case matters
An offline floating representation model isolates a reproducible arithmetic fault.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
if math.isnan(x): return 'nan'
if math.isinf(x): return '-infinity' if x<0 else '+infinity'
return format(x,'.11g')
N = 1
observations = []
def solve(a,b):
try:
if a==b: return "0"
d=b-a
if abs(d)<1e-8:
ratio=1+d/2+d*d/6
else:
ratio=math.expm1(d)/d
result=math.exp(a)*ratio
return render(result)
except (ValueError, OverflowError, ZeroDivisionError, TypeError):
return "arithmetic-error"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('coincident', solve(float(N),float(N)), render(math.exp(N)))
check('near endpoints', solve(0.0,N*2.0**-60), "1")
check('shifted near', solve(1.0,1.0+N*2.0**-50), render(math.exp(1)*(1+N*2.0**-50/2)))
check('forward', solve(0.0,float(N)), render(math.expm1(N)/N))
check('reverse', solve(float(N),0.0), render(math.expm1(N)/N))
check('negative interval', solve(-float(N),0.0), render(-math.expm1(-N)/N))
check('separated', solve(-1.0,1.0), render((math.exp(1)-math.exp(-1))/2))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| coincident | 0 | 2.7182818285 | Failed |
| near endpoints | 1 | 1 | Passed |
| shifted near | 2.7182818285 | 2.7182818285 | Passed |
| forward | 1.7182818285 | 1.7182818285 | Passed |
| reverse | 1.7182818285 | 1.7182818285 | Passed |
| negative interval | 0.63212055883 | 0.63212055883 | Passed |
| separated | 1.1752011936 | 1.1752011936 | Passed |
SHA-256 / ddc217ba27f7d950858dbacf372a6aa01bbeaf8dff2d01be8d58bf889dc0a518
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import struct
def render(x):
if math.isnan(x): return 'nan'
if math.isinf(x): return '-infinity' if x<0 else '+infinity'
return format(x,'.11g')
N = 1
observations = []
def solve(a,b):
try:
if a==b: return "1"
d=b-a
if abs(d)<1e-8:
ratio=1+d/2+d*d/6
else:
ratio=math.expm1(d)/d
result=math.exp(a)*ratio
return render(result)
except (ValueError, OverflowError, ZeroDivisionError, TypeError):
return "arithmetic-error"
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('coincident', solve(float(N),float(N)), render(math.exp(N)))
check('near endpoints', solve(0.0,N*2.0**-60), "1")
check('shifted near', solve(1.0,1.0+N*2.0**-50), render(math.exp(1)*(1+N*2.0**-50/2)))
check('forward', solve(0.0,float(N)), render(math.expm1(N)/N))
check('reverse', solve(float(N),0.0), render(math.expm1(N)/N))
check('negative interval', solve(-float(N),0.0), render(-math.expm1(-N)/N))
check('separated', solve(-1.0,1.0), render((math.exp(1)-math.exp(-1))/2))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| coincident | 1 | 2.7182818285 | Failed |
| near endpoints | 1 | 1 | Passed |
| shifted near | 2.7182818285 | 2.7182818285 | Passed |
| forward | 1.7182818285 | 1.7182818285 | Passed |
| reverse | 1.7182818285 | 1.7182818285 | Passed |
| negative interval | 0.63212055883 | 0.63212055883 | Passed |
| separated | 1.1752011936 | 1.1752011936 | Passed |
SHA-256 / 421fe1ea519c2d8e406605ba4b0cbfff34414b55f18dd20cedc781212c58168c
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:39:41.953326+00:00.
Case digest / 9c305a3dfedcf6f564e950c2ee553c313983d455c82dc0484644cea4dd0921d0