FAILURE MAP
← Case archive

FA-6441 / Discrete calculus / Open access

Binomial forward difference order three · case 01

The binomial stencil coefficients are replaced with unit alternation.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The binomial stencil coefficients are replaced with unit alternation.

THE FAILURE

The binomial stencil coefficients are replaced with unit alternation.

Unsuccessful approach: A second difference is returned for a third-difference contract.

Case contract

Integer sample values and compatible sample-array lengths. Rational results are reduced Fraction strings; spacing is positive unless explicitly stated otherwise. v contains exactly four equally spaced observations. Exact operational definition: v[3]-3*v[2]+3*v[1]-v[0]

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(v):
    return v[3]-v[2]+v[1]-v[0]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([0, 1, 8, 27],)', solve(*([0, 1, 8, 27],)), 6)
check('fixture 2: ([1, 4, 9, 16],)', solve(*([1, 4, 9, 16],)), 0)
check('fixture 3: ([5, 5, 5, 5],)', solve(*([5, 5, 5, 5],)), 0)
check('fixture 4: ([0, 0, 0, 1],)', solve(*([0, 0, 0, 1],)), 1)
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 fixtureActualExpectedOutcome
fixture 1: ([0, 1, 8, 27],)206Failed
fixture 2: ([1, 4, 9, 16],)100Failed
fixture 3: ([5, 5, 5, 5],)00Passed
fixture 4: ([0, 0, 0, 1],)11Passed

SHA-256 / 0f085ae09d6626d1b6f5a91fc88ed2b16d51670a9f8518eac1ad32325422ab2c

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(v):
    return v[3]-2*v[2]+v[1]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1: ([0, 1, 8, 27],)', solve(*([0, 1, 8, 27],)), 6)
check('fixture 2: ([1, 4, 9, 16],)', solve(*([1, 4, 9, 16],)), 0)
check('fixture 3: ([5, 5, 5, 5],)', solve(*([5, 5, 5, 5],)), 0)
check('fixture 4: ([0, 0, 0, 1],)', solve(*([0, 0, 0, 1],)), 1)
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 fixtureActualExpectedOutcome
fixture 1: ([0, 1, 8, 27],)126Failed
fixture 2: ([1, 4, 9, 16],)20Failed
fixture 3: ([5, 5, 5, 5],)00Passed
fixture 4: ([0, 0, 0, 1],)11Passed

SHA-256 / 53a3ffbe2d8eaa2f20f42d91927580cacd77ffaef5f91d64d036a3aa0cf0248f

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 4 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

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.974989+00:00.

Case digest / 6f8953d7fc5f6dc7d45099d13f27fca840cf204e8a08f1467a5659b84deebafc