FA-49956 / PCM sample encoding / Open access
Pcm companding segment code: sign sideband · case 01
Numerical zero receives a negative PCM sign tag.
ROOT CAUSE
Numerical zero receives a negative PCM sign tag.
THE FAILURE
Numerical zero receives a negative PCM sign tag.
Unsuccessful approach: Positive amplitudes are tagged negative and negatives positive.
Case contract
Encode bounded PCM magnitude into an explicitly stipulated piecewise companding table: sign sideband, selected lower-bound segment and shifted residual mantissa.
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(samples, edges, shifts):
out=[]
for sample in samples:
negative=sample<=0
magnitude=abs(sample)
segment=0
while segment+1<len(edges) and magnitude>=edges[segment+1]:
segment+=1
residual=max(0,magnitude-edges[segment])
mantissa=residual>>shifts[segment]
out.append([negative,segment,mantissa])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([-15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3])), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
check('oracle 2', solve(*([0, 2, 3, 8], [0, 3, 8], [0, 2, 2])), [[False, 0, 0], [False, 0, 2], [False, 1, 0], [False, 2, 0]])
check('oracle 3', solve(*([1, 2, 3], [0], [1])), [[False, 0, 0], [False, 0, 1], [False, 0, 1]])
check('oracle 4', solve(*([], [0, 8], [1, 3])), [])
check('oracle 5', solve(*([-8, 8, 9], [0, 8], [0, 3])), [[True, 1, 0], [False, 1, 0], [False, 1, 0]])
check('oracle 6', solve(*([0, 1, 16], [0, 1, 16], [0, 0, 2])), [[False, 0, 0], [False, 1, 0], [False, 2, 0]])
check('oracle 7', solve(*([7, -7], [0, 4], [1, 0])), [[False, 1, 3], [True, 1, 3]])
if N == 1: check('variant packet 1', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
if N == 2: check('variant packet 2', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
if N == 3: check('variant packet 3', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
if N == 4: check('variant packet 4', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
if N == 5: check('variant packet 5', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 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 |
|---|---|---|---|
| oracle 1 | [[True, 2, 0], [True, 1, 0], [True, 0, 0], [False, 1, 0], [False, 2, 0]] | [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]] | Failed |
| oracle 2 | [[True, 0, 0], [False, 0, 2], [False, 1, 0], [False, 2, 0]] | [[False, 0, 0], [False, 0, 2], [False, 1, 0], [False, 2, 0]] | Failed |
| oracle 3 | [[False, 0, 0], [False, 0, 1], [False, 0, 1]] | [[False, 0, 0], [False, 0, 1], [False, 0, 1]] | Passed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [[True, 1, 0], [False, 1, 0], [False, 1, 0]] | [[True, 1, 0], [False, 1, 0], [False, 1, 0]] | Passed |
| oracle 6 | [[True, 0, 0], [False, 1, 0], [False, 2, 0]] | [[False, 0, 0], [False, 1, 0], [False, 2, 0]] | Failed |
| oracle 7 | [[False, 1, 3], [True, 1, 3]] | [[False, 1, 3], [True, 1, 3]] | Passed |
| variant packet 1 | [[True, 2, 0], [True, 1, 0], [True, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [True, 0, 0], [False, 1, 0], [False, 2, 0]] | [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]] | Failed |
SHA-256 / e1c129d24a65b2d46d3a042e2e7f0ea72be55231a56fdd5b5adc7c1deab8fde4
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(samples, edges, shifts):
out=[]
for sample in samples:
negative=sample>0
magnitude=abs(sample)
segment=0
while segment+1<len(edges) and magnitude>=edges[segment+1]:
segment+=1
residual=max(0,magnitude-edges[segment])
mantissa=residual>>shifts[segment]
out.append([negative,segment,mantissa])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([-15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3])), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
check('oracle 2', solve(*([0, 2, 3, 8], [0, 3, 8], [0, 2, 2])), [[False, 0, 0], [False, 0, 2], [False, 1, 0], [False, 2, 0]])
check('oracle 3', solve(*([1, 2, 3], [0], [1])), [[False, 0, 0], [False, 0, 1], [False, 0, 1]])
check('oracle 4', solve(*([], [0, 8], [1, 3])), [])
check('oracle 5', solve(*([-8, 8, 9], [0, 8], [0, 3])), [[True, 1, 0], [False, 1, 0], [False, 1, 0]])
check('oracle 6', solve(*([0, 1, 16], [0, 1, 16], [0, 0, 2])), [[False, 0, 0], [False, 1, 0], [False, 2, 0]])
check('oracle 7', solve(*([7, -7], [0, 4], [1, 0])), [[False, 1, 3], [True, 1, 3]])
if N == 1: check('variant packet 1', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
if N == 2: check('variant packet 2', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
if N == 3: check('variant packet 3', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
if N == 4: check('variant packet 4', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]])
if N == 5: check('variant packet 5', solve(*[[-15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15, -15, -4, 0, 4, 15], [0, 4, 12], [0, 1, 3]]), [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 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 |
|---|---|---|---|
| oracle 1 | [[False, 2, 0], [False, 1, 0], [False, 0, 0], [True, 1, 0], [True, 2, 0]] | [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]] | Failed |
| oracle 2 | [[False, 0, 0], [True, 0, 2], [True, 1, 0], [True, 2, 0]] | [[False, 0, 0], [False, 0, 2], [False, 1, 0], [False, 2, 0]] | Failed |
| oracle 3 | [[True, 0, 0], [True, 0, 1], [True, 0, 1]] | [[False, 0, 0], [False, 0, 1], [False, 0, 1]] | Failed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [[False, 1, 0], [True, 1, 0], [True, 1, 0]] | [[True, 1, 0], [False, 1, 0], [False, 1, 0]] | Failed |
| oracle 6 | [[False, 0, 0], [True, 1, 0], [True, 2, 0]] | [[False, 0, 0], [False, 1, 0], [False, 2, 0]] | Failed |
| oracle 7 | [[True, 1, 3], [False, 1, 3]] | [[False, 1, 3], [True, 1, 3]] | Failed |
| variant packet 1 | [[False, 2, 0], [False, 1, 0], [False, 0, 0], [True, 1, 0], [True, 2, 0], [False, 2, 0], [False, 1, 0], [False, 0, 0], [True, 1, 0], [True, 2, 0]] | [[True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0], [True, 2, 0], [True, 1, 0], [False, 0, 0], [False, 1, 0], [False, 2, 0]] | Failed |
SHA-256 / 83963de225653c13d730a5f0070bec5a038cb4cfa8efa5b618e8e2b884230980
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:04.807381+00:00.
Case digest / 7326e36aba86f7fae86f93d72cea39675e12ed4895c60c79ca9ea269dcb5ce8a