FA-6391 / Discrete calculus / Open access
Central second derivative samples · case 01
A second derivative is divided by one step instead of squared step.
ROOT CAUSE
A second derivative is divided by one step instead of squared step.
VERIFIED REPAIR
Apply the specified mathematical contract directly, preserving all terms and boundary cases: return str(Fraction(left-2*center+right,h*h))
Unsuccessful approach: The central sample coefficient is one instead of two.
Case contract
Integer sample values and compatible sample-array lengths. Rational results are reduced Fraction strings; spacing is positive unless explicitly stated otherwise. Central second derivative samples. Exact operational definition: str(Fraction(left-2*center+right,h*h))
Why this case matters
Small exact fixtures expose this error without platform timing, external services, or probabilistic observations. Discrete calculus 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(left, center, right, h):
return str(Fraction(left-2*center+right,h))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0, 4, 16, 2)', solve(*(0, 4, 16, 2)), '2')
check('fixture 2: (3, 3, 3, 1)', solve(*(3, 3, 3, 1)), '0')
check('fixture 3: (1, 0, 1, 1)', solve(*(1, 0, 1, 1)), '2')
check('fixture 4: (0, 1, 0, 2)', solve(*(0, 1, 0, 2)), '-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 |
|---|---|---|---|
| fixture 1: (0, 4, 16, 2) | 4 | 2 | Failed |
| fixture 2: (3, 3, 3, 1) | 0 | 0 | Passed |
| fixture 3: (1, 0, 1, 1) | 2 | 2 | Passed |
| fixture 4: (0, 1, 0, 2) | -1 | -1/2 | Failed |
SHA-256 / e72a886cd8493285fca8cdc49ce579703a79d2145644adfc9ba7259f383efd2b
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(left, center, right, h):
return str(Fraction(left-center+right,h*h))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0, 4, 16, 2)', solve(*(0, 4, 16, 2)), '2')
check('fixture 2: (3, 3, 3, 1)', solve(*(3, 3, 3, 1)), '0')
check('fixture 3: (1, 0, 1, 1)', solve(*(1, 0, 1, 1)), '2')
check('fixture 4: (0, 1, 0, 2)', solve(*(0, 1, 0, 2)), '-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 |
|---|---|---|---|
| fixture 1: (0, 4, 16, 2) | 3 | 2 | Failed |
| fixture 2: (3, 3, 3, 1) | 3 | 0 | Failed |
| fixture 3: (1, 0, 1, 1) | 2 | 2 | Passed |
| fixture 4: (0, 1, 0, 2) | -1/4 | -1/2 | Failed |
SHA-256 / 993dd4ec6811c6781948af4b3eff587024807936ff780b446a180edbfb7dd467
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(left, center, right, h):
return str(Fraction(left-2*center+right,h*h))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: (0, 4, 16, 2)', solve(*(0, 4, 16, 2)), '2')
check('fixture 2: (3, 3, 3, 1)', solve(*(3, 3, 3, 1)), '0')
check('fixture 3: (1, 0, 1, 1)', solve(*(1, 0, 1, 1)), '2')
check('fixture 4: (0, 1, 0, 2)', solve(*(0, 1, 0, 2)), '-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 |
|---|---|---|---|
| fixture 1: (0, 4, 16, 2) | 2 | 2 | Passed |
| fixture 2: (3, 3, 3, 1) | 0 | 0 | Passed |
| fixture 3: (1, 0, 1, 1) | 2 | 2 | Passed |
| fixture 4: (0, 1, 0, 2) | -1/2 | -1/2 | Passed |
SHA-256 / 11e9d342a492e31f4bc6512ccbf4dd914cddcbea4be5f350f4a5fc1d2089d96c
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:38:01.394936+00:00.
Case digest / 07d3ee1b294e5f0093df5be3358d98f73838fc98e7ea6b9212e63f3cd96cd738