FA-5466 / Integer arithmetic / Open access
Geometric integer series · case 01
The next term is confused with the series sum.
ROOT CAUSE
The next term is confused with the series sum.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return sum(a*r**i for i in range(n))
Unsuccessful approach: The exponent range omits the initial term and adds one extra term.
Case contract
Integer arguments; denominators, steps, moduli, and bit widths are positive. Unsigned word inputs fit the specified width except where masking is explicitly the operation. Sequence sizes are nonnegative. a and r may be signed; n>=0. Sum a*r**i for i=0..n-1, including the zeroth-power convention. Exact operational definition: sum(a*r**i for i in range(n))
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Integer mathematics results depend on the stated convention.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(a, r, n):
return a*r**n
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (2, 3, 4)', solve(*(2, 3, 4)), 80)
check('fixture 2: (5, 1, 3)', solve(*(5, 1, 3)), 15)
check('fixture 3: (7, 0, 3)', solve(*(7, 0, 3)), 7)
check('fixture 4: (3, 2, 0)', solve(*(3, 2, 0)), 0)
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 |
|---|---|---|---|
| fixture 1: (2, 3, 4) | 162 | 80 | Failed |
| fixture 2: (5, 1, 3) | 5 | 15 | Failed |
| fixture 3: (7, 0, 3) | 0 | 7 | Failed |
| fixture 4: (3, 2, 0) | 3 | 0 | Failed |
SHA-256 / b28d787be0f898600fa110269aa5418590cf5df586037f2d4217976b108b41e2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(a, r, n):
return sum(a*r**i for i in range(1,n+1))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (2, 3, 4)', solve(*(2, 3, 4)), 80)
check('fixture 2: (5, 1, 3)', solve(*(5, 1, 3)), 15)
check('fixture 3: (7, 0, 3)', solve(*(7, 0, 3)), 7)
check('fixture 4: (3, 2, 0)', solve(*(3, 2, 0)), 0)
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 |
|---|---|---|---|
| fixture 1: (2, 3, 4) | 240 | 80 | Failed |
| fixture 2: (5, 1, 3) | 15 | 15 | Passed |
| fixture 3: (7, 0, 3) | 0 | 7 | Failed |
| fixture 4: (3, 2, 0) | 0 | 0 | Passed |
SHA-256 / 9b637b4094aa8a1d44ad9b70609bbd23d1f5e0a22c2057c4ebab4b91aae30487
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import math
import calendar
import statistics
import itertools
from fractions import Fraction
from datetime import date, datetime, timedelta, timezone
from decimal import Decimal, ROUND_HALF_UP, ROUND_DOWN, ROUND_CEILING, ROUND_FLOOR
N = 1
observations = []
def solve(a, r, n):
return sum(a*r**i for i in range(n))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (2, 3, 4)', solve(*(2, 3, 4)), 80)
check('fixture 2: (5, 1, 3)', solve(*(5, 1, 3)), 15)
check('fixture 3: (7, 0, 3)', solve(*(7, 0, 3)), 7)
check('fixture 4: (3, 2, 0)', solve(*(3, 2, 0)), 0)
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 |
|---|---|---|---|
| fixture 1: (2, 3, 4) | 80 | 80 | Passed |
| fixture 2: (5, 1, 3) | 15 | 15 | Passed |
| fixture 3: (7, 0, 3) | 7 | 7 | Passed |
| fixture 4: (3, 2, 0) | 0 | 0 | Passed |
SHA-256 / 5f50c60f9caf271f5c19294d9ecd8a64a7b244d5ea0ace278ada6b849815b16f
Verification & scope
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:37:49.870434+00:00.
Case digest / 38326dcd6917b9fd06ca801e463cbc8ff46f2fdafe11be610bf0a2cfb6397c71