FAILURE MAP
← Case archive

FA-49326 / PCM sample encoding / Open access

Pcm block exponent: shift limit · case 01

Exponent exceeds the packet field limit by one.

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

ROOT CAUSE

Exponent exceeds the packet field limit by one.

VERIFIED REPAIR

Use the stated conversion contract at shift limit.

Unsuccessful approach: Stopping early needlessly saturates representable high-range blocks.

Case contract

Bounded block-floating PCM: choose the smallest shared right shift fitting signed mantissas, cap exponent, saturate residual overflow and report reconstructed amplitudes.

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, mantissa_bits, max_shift):
    shift=0
    low=-(1<<(mantissa_bits-1))
    high=(1<<(mantissa_bits-1))-1
    while shift<=max_shift and any((x>>shift)<low or (x>>shift)>high for x in samples):
        shift+=1
    mantissas=[max(low,min(high,x>>shift)) for x in samples]
    restored=[x<<shift for x in mantissas]
    return [shift,mantissas,restored]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 8, -9], 4, 3)), [1, [0, 4, -5], [0, 8, -10]])
check('oracle 2', solve(*([7, -8], 4, 3)), [0, [7, -8], [7, -8]])
check('oracle 3', solve(*([0, 100, -100], 4, 2)), [2, [0, 7, -8], [0, 28, -32]])
check('oracle 4', solve(*([], 4, 3)), [0, [], []])
check('oracle 5', solve(*([-17, 3], 4, 4)), [2, [-5, 0], [-20, 0]])
check('oracle 6', solve(*([1, 2], 3, 0)), [0, [1, 2], [1, 2]])
check('oracle 7', solve(*([16, -16], 4, 1)), [1, [7, -8], [14, -16]])
if N == 1: check('variant packet 1', solve(*[[1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10]])
if N == 2: check('variant packet 2', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10]])
if N == 3: check('variant packet 3', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10]])
if N == 4: check('variant packet 4', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10]])
if N == 5: check('variant packet 5', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10]])
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
oracle 1[1, [0, 4, -5], [0, 8, -10]][1, [0, 4, -5], [0, 8, -10]]Passed
oracle 2[0, [7, -8], [7, -8]][0, [7, -8], [7, -8]]Passed
oracle 3[3, [0, 7, -8], [0, 56, -64]][2, [0, 7, -8], [0, 28, -32]]Failed
oracle 4[0, [], []][0, [], []]Passed
oracle 5[2, [-5, 0], [-20, 0]][2, [-5, 0], [-20, 0]]Passed
oracle 6[0, [1, 2], [1, 2]][0, [1, 2], [1, 2]]Passed
oracle 7[2, [4, -4], [16, -16]][1, [7, -8], [14, -16]]Failed
variant packet 1[1, [0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10]][1, [0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10]]Passed

SHA-256 / 22c1902335f890806ae683d25cae5b92434390ca1349e2dc70d1f80f01ae0e7e

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(samples, mantissa_bits, max_shift):
    shift=0
    low=-(1<<(mantissa_bits-1))
    high=(1<<(mantissa_bits-1))-1
    while shift<max(0,max_shift-1) and any((x>>shift)<low or (x>>shift)>high for x in samples):
        shift+=1
    mantissas=[max(low,min(high,x>>shift)) for x in samples]
    restored=[x<<shift for x in mantissas]
    return [shift,mantissas,restored]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 8, -9], 4, 3)), [1, [0, 4, -5], [0, 8, -10]])
check('oracle 2', solve(*([7, -8], 4, 3)), [0, [7, -8], [7, -8]])
check('oracle 3', solve(*([0, 100, -100], 4, 2)), [2, [0, 7, -8], [0, 28, -32]])
check('oracle 4', solve(*([], 4, 3)), [0, [], []])
check('oracle 5', solve(*([-17, 3], 4, 4)), [2, [-5, 0], [-20, 0]])
check('oracle 6', solve(*([1, 2], 3, 0)), [0, [1, 2], [1, 2]])
check('oracle 7', solve(*([16, -16], 4, 1)), [1, [7, -8], [14, -16]])
if N == 1: check('variant packet 1', solve(*[[1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10]])
if N == 2: check('variant packet 2', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10]])
if N == 3: check('variant packet 3', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10]])
if N == 4: check('variant packet 4', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10]])
if N == 5: check('variant packet 5', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10]])
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
oracle 1[1, [0, 4, -5], [0, 8, -10]][1, [0, 4, -5], [0, 8, -10]]Passed
oracle 2[0, [7, -8], [7, -8]][0, [7, -8], [7, -8]]Passed
oracle 3[1, [0, 7, -8], [0, 14, -16]][2, [0, 7, -8], [0, 28, -32]]Failed
oracle 4[0, [], []][0, [], []]Passed
oracle 5[2, [-5, 0], [-20, 0]][2, [-5, 0], [-20, 0]]Passed
oracle 6[0, [1, 2], [1, 2]][0, [1, 2], [1, 2]]Passed
oracle 7[0, [7, -8], [7, -8]][1, [7, -8], [14, -16]]Failed
variant packet 1[1, [0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10]][1, [0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10]]Passed

SHA-256 / 62029ecb699111d7b647ad9071ed1b0cbf9aaa10a908a3c848470e4be7513ee5

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(samples, mantissa_bits, max_shift):
    shift=0
    low=-(1<<(mantissa_bits-1))
    high=(1<<(mantissa_bits-1))-1
    while shift<max_shift and any((x>>shift)<low or (x>>shift)>high for x in samples):
        shift+=1
    mantissas=[max(low,min(high,x>>shift)) for x in samples]
    restored=[x<<shift for x in mantissas]
    return [shift,mantissas,restored]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([1, 8, -9], 4, 3)), [1, [0, 4, -5], [0, 8, -10]])
check('oracle 2', solve(*([7, -8], 4, 3)), [0, [7, -8], [7, -8]])
check('oracle 3', solve(*([0, 100, -100], 4, 2)), [2, [0, 7, -8], [0, 28, -32]])
check('oracle 4', solve(*([], 4, 3)), [0, [], []])
check('oracle 5', solve(*([-17, 3], 4, 4)), [2, [-5, 0], [-20, 0]])
check('oracle 6', solve(*([1, 2], 3, 0)), [0, [1, 2], [1, 2]])
check('oracle 7', solve(*([16, -16], 4, 1)), [1, [7, -8], [14, -16]])
if N == 1: check('variant packet 1', solve(*[[1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10]])
if N == 2: check('variant packet 2', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10]])
if N == 3: check('variant packet 3', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10]])
if N == 4: check('variant packet 4', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10]])
if N == 5: check('variant packet 5', solve(*[[1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9, 1, 8, -9], 4, 3]), [1, [0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10, 0, 8, -10]])
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
oracle 1[1, [0, 4, -5], [0, 8, -10]][1, [0, 4, -5], [0, 8, -10]]Passed
oracle 2[0, [7, -8], [7, -8]][0, [7, -8], [7, -8]]Passed
oracle 3[2, [0, 7, -8], [0, 28, -32]][2, [0, 7, -8], [0, 28, -32]]Passed
oracle 4[0, [], []][0, [], []]Passed
oracle 5[2, [-5, 0], [-20, 0]][2, [-5, 0], [-20, 0]]Passed
oracle 6[0, [1, 2], [1, 2]][0, [1, 2], [1, 2]]Passed
oracle 7[1, [7, -8], [14, -16]][1, [7, -8], [14, -16]]Passed
variant packet 1[1, [0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10]][1, [0, 4, -5, 0, 4, -5], [0, 8, -10, 0, 8, -10]]Passed

SHA-256 / 5b4678c919089b750980866f16a66618f4415c764c95475c5be721cddefd9c3f

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

Case digest / e7de88d3bc2d3471e453fa160543b44472709bdbf0957d84045d1c997939b43a