FA-16681 / Floating-point arithmetic / Open access
Interpolation forms an overflowing difference across signs · case 01
Interpolation forms an overflowing difference across signs.
ROOT CAUSE
Interpolation forms an overflowing difference across signs. The faulty expression is result=a+t*(b-a).
THE FAILURE
Interpolation forms an overflowing difference across signs. The faulty expression is result=a+t*(b-a).
Unsuccessful approach: The attempted local correction result=a+t*min(b-a,1e308) still violates the explicit regression fixtures.
Case contract
Interpolate finite a and b at t in [0,1], preserving endpoints and avoiding overflow in a difference or an endpoint sum. Return domain marker outside the interval. 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,t):
try:
if not 0<=t<=1: return 'domain'
if t==0: return render(a)
if t==1: return render(b)
if (a<=0<=b) or (b<=0<=a):
result=a+t*(b-a)
else:
result=a+t*(b-a)
result=min(max(a,b),max(min(a,b),result))
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('opposite asymmetric', solve(-float(N),float(N),0.25), render(-N/2))
check('opposite extremes', solve(-1e308,1e308,0.5), "0")
check('same extremes', solve(1e308,1.5e308,0.5), render(1.25e308))
check('first endpoint', solve(-0.0,float(N),0.0), "-0")
check('last endpoint', solve(float(N),-0.0,1.0), "-0")
check('increasing', solve(float(N),float(N+8),0.25), render(N+2))
check('decreasing', solve(float(N+8),float(N),0.25), render(N+6))
check('negative same sign', solve(-float(N+8),-float(N),0.25), render(-N-6))
check('outside', solve(float(N),float(N+8),1.5), "domain")
check('tiny blend', solve(N*1e-300,3*N*1e-300,0.5), render(2*N*1e-300))
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 |
|---|---|---|---|
| opposite asymmetric | -0.5 | -0.5 | Passed |
| opposite extremes | 1e+308 | 0 | Failed |
| same extremes | 1.25e+308 | 1.25e+308 | Passed |
| first endpoint | -0 | -0 | Passed |
| last endpoint | -0 | -0 | Passed |
| increasing | 3 | 3 | Passed |
| decreasing | 7 | 7 | Passed |
| negative same sign | -7 | -7 | Passed |
| outside | domain | domain | Passed |
| tiny blend | 2e-300 | 2e-300 | Passed |
SHA-256 / de3633cc5b007c7257d7b4f0d27814db7f1d6b3cfcd6b08ed9e3a8b5364b3898
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,t):
try:
if not 0<=t<=1: return 'domain'
if t==0: return render(a)
if t==1: return render(b)
if (a<=0<=b) or (b<=0<=a):
result=a+t*min(b-a,1e308)
else:
result=a+t*(b-a)
result=min(max(a,b),max(min(a,b),result))
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('opposite asymmetric', solve(-float(N),float(N),0.25), render(-N/2))
check('opposite extremes', solve(-1e308,1e308,0.5), "0")
check('same extremes', solve(1e308,1.5e308,0.5), render(1.25e308))
check('first endpoint', solve(-0.0,float(N),0.0), "-0")
check('last endpoint', solve(float(N),-0.0,1.0), "-0")
check('increasing', solve(float(N),float(N+8),0.25), render(N+2))
check('decreasing', solve(float(N+8),float(N),0.25), render(N+6))
check('negative same sign', solve(-float(N+8),-float(N),0.25), render(-N-6))
check('outside', solve(float(N),float(N+8),1.5), "domain")
check('tiny blend', solve(N*1e-300,3*N*1e-300,0.5), render(2*N*1e-300))
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 |
|---|---|---|---|
| opposite asymmetric | -0.5 | -0.5 | Passed |
| opposite extremes | -5e+307 | 0 | Failed |
| same extremes | 1.25e+308 | 1.25e+308 | Passed |
| first endpoint | -0 | -0 | Passed |
| last endpoint | -0 | -0 | Passed |
| increasing | 3 | 3 | Passed |
| decreasing | 7 | 7 | Passed |
| negative same sign | -7 | -7 | Passed |
| outside | domain | domain | Passed |
| tiny blend | 2e-300 | 2e-300 | Passed |
SHA-256 / 72f7ac49eecaa6a4bcab68e73c5274e52517cd390c95d8bba5372fba20f0848c
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 10 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:38.838009+00:00.
Case digest / 48869ad5b5600ccb9f34948f0e0daab560cd8af86ed87cb02a29f2408a84dd7d