FA-50146 / PCM sample encoding / Open access
Pcm lpc residual reconstruction: sum before division · case 01
Per-tap rounding changes the integer LPC prediction.
ROOT CAUSE
Per-tap rounding changes the integer LPC prediction.
THE FAILURE
Per-tap rounding changes the integer LPC prediction.
Unsuccessful approach: Truncation toward zero differs from the declared floor for negative predictions.
Case contract
Reconstruct bounded integer PCM LPC residuals using newest-first history, floor-divided complete dot products and reconstructed-sample history feedback.
Why this case matters
Offline PCM interchange uses these exact bounded packet and sample representation decisions.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(residuals, history, coefficients, divisor):
state=list(history)
out=[]
for residual in residuals:
prediction=sum(c*x//divisor for c,x in zip(coefficients,state))
sample=prediction+residual
out.append(sample)
state=[sample]+state[:-1]
return [out,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 2, -1], [3, 1], [2, -1], 1)), [[6, 11, 15], [15, 11]])
check('oracle 2', solve(*([0, 1, -2], [-3, 2], [1, 1], 3)), [[-1, -1, -3], [-3, -1]])
check('oracle 3', solve(*([], [2, 1], [2, -1], 1)), [[], [2, 1]])
check('oracle 4', solve(*([2, 0, 1], [0, 0, 0], [3, -2, 1], 2)), [[2, 3, 3], [3, 3, 2]])
check('oracle 5', solve(*([-1, 3], [5], [1], 2)), [[1, 3], [3]])
check('oracle 6', solve(*([1, 1], [1, 2, 3], [1, 2, 3], 4)), [[4, 4], [4, 4, 1]])
check('oracle 7', solve(*([0, -1], [4, -2], [3, 1], 3)), [[3, 3], [3, 3]])
if N == 1: check('variant packet 1', solve(*[[1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33], [33, 27]])
if N == 2: check('variant packet 2', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57], [57, 49]])
if N == 3: check('variant packet 3', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87], [87, 77]])
if N == 4: check('variant packet 4', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123], [123, 111]])
if N == 5: check('variant packet 5', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123, 136, 151, 165], [165, 151]])
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 |
|---|---|---|---|
| oracle 1 | [[6, 11, 15], [15, 11]] | [[6, 11, 15], [15, 11]] | Passed |
| oracle 2 | [[-1, -1, -4], [-4, -1]] | [[-1, -1, -3], [-3, -1]] | Failed |
| oracle 3 | [[], [2, 1]] | [[], [2, 1]] | Passed |
| oracle 4 | [[2, 3, 3], [3, 3, 2]] | [[2, 3, 3], [3, 3, 2]] | Passed |
| oracle 5 | [[1, 3], [3]] | [[1, 3], [3]] | Passed |
| oracle 6 | [[4, 3], [3, 4, 1]] | [[4, 4], [4, 4, 1]] | Failed |
| oracle 7 | [[3, 3], [3, 3]] | [[3, 3], [3, 3]] | Passed |
| variant packet 1 | [[6, 11, 15, 20, 27, 33], [33, 27]] | [[6, 11, 15, 20, 27, 33], [33, 27]] | Passed |
SHA-256 / e402789626a928e9ccc149af5c9909fcfe99576ec78ea7650eb98e57c388b161
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(residuals, history, coefficients, divisor):
state=list(history)
out=[]
for residual in residuals:
prediction=int(sum(c*x for c,x in zip(coefficients,state))/divisor)
sample=prediction+residual
out.append(sample)
state=[sample]+state[:-1]
return [out,state]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 2, -1], [3, 1], [2, -1], 1)), [[6, 11, 15], [15, 11]])
check('oracle 2', solve(*([0, 1, -2], [-3, 2], [1, 1], 3)), [[-1, -1, -3], [-3, -1]])
check('oracle 3', solve(*([], [2, 1], [2, -1], 1)), [[], [2, 1]])
check('oracle 4', solve(*([2, 0, 1], [0, 0, 0], [3, -2, 1], 2)), [[2, 3, 3], [3, 3, 2]])
check('oracle 5', solve(*([-1, 3], [5], [1], 2)), [[1, 3], [3]])
check('oracle 6', solve(*([1, 1], [1, 2, 3], [1, 2, 3], 4)), [[4, 4], [4, 4, 1]])
check('oracle 7', solve(*([0, -1], [4, -2], [3, 1], 3)), [[3, 3], [3, 3]])
if N == 1: check('variant packet 1', solve(*[[1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33], [33, 27]])
if N == 2: check('variant packet 2', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57], [57, 49]])
if N == 3: check('variant packet 3', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87], [87, 77]])
if N == 4: check('variant packet 4', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123], [123, 111]])
if N == 5: check('variant packet 5', solve(*[[1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1, 1, 2, -1], [3, 1], [2, -1], 1]), [[6, 11, 15, 20, 27, 33, 40, 49, 57, 66, 77, 87, 98, 111, 123, 136, 151, 165], [165, 151]])
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 |
|---|---|---|---|
| oracle 1 | [[6, 11, 15], [15, 11]] | [[6, 11, 15], [15, 11]] | Passed |
| oracle 2 | [[0, 0, -2], [-2, 0]] | [[-1, -1, -3], [-3, -1]] | Failed |
| oracle 3 | [[], [2, 1]] | [[], [2, 1]] | Passed |
| oracle 4 | [[2, 3, 3], [3, 3, 2]] | [[2, 3, 3], [3, 3, 2]] | Passed |
| oracle 5 | [[1, 3], [3]] | [[1, 3], [3]] | Passed |
| oracle 6 | [[4, 4], [4, 4, 1]] | [[4, 4], [4, 4, 1]] | Passed |
| oracle 7 | [[3, 3], [3, 3]] | [[3, 3], [3, 3]] | Passed |
| variant packet 1 | [[6, 11, 15, 20, 27, 33], [33, 27]] | [[6, 11, 15, 20, 27, 33], [33, 27]] | Passed |
SHA-256 / 00cc992912e1faf4f1c6c55561bbd30677b50bb787d035adde3f689e559b36a1
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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
Stipulated finite model; no claim of hardware timing or full file-format conformance. 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:45:06.619573+00:00.
Case digest / 784ab7351907c6b828fba32b657a26a19ebd57d27ad6656fd110e1504cc1ea4d