FAILURE MAP
← Case archive

FA-10811 / PCM sample encoding / Open access

Pcm16 to float asymmetric range · case 01

Normalization by positive maximum pushes negative full scale below -1.

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

ROOT CAUSE

Normalization by positive maximum pushes negative full scale below -1.

VERIFIED REPAIR

Apply the explicit PCM/playback contract: Convert signed16 sample integers to normalized floats by dividing by32768; maximum positive is below one.

Unsuccessful approach: Integer division destroys all intermediate sample amplitudes.

Case contract

Convert signed16 sample integers to normalized floats by dividing by32768; maximum positive is below one.

Why this case matters

A pure Python local audio pipeline stage with explicit sample formats and frame conventions; no real-time device or signal-spectrum claims.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples):
    return [x/32767 for x in samples]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([-32768, 0, 16384],)),[-1, 0, 0.5])
check('fixture 2',solve(*([32767],)),[0.999969482421875])
check('fixture 3',solve(*([],)),[])
check('fixture 4',solve(*([-16384],)),[-0.5])
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[-1.000030518509476, 0.0, 0.500015259254738][-1, 0, 0.5]Failed
fixture 2[1.0][0.999969482421875]Failed
fixture 3[][]Passed
fixture 4[-0.500015259254738][-0.5]Failed

SHA-256 / 6077e24cb84a6e9f7ee8f3df7b155a31860541956f24949c5ff0444606bdcb20

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples):
    return [x//32768 for x in samples]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([-32768, 0, 16384],)),[-1, 0, 0.5])
check('fixture 2',solve(*([32767],)),[0.999969482421875])
check('fixture 3',solve(*([],)),[])
check('fixture 4',solve(*([-16384],)),[-0.5])
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[-1, 0, 0][-1, 0, 0.5]Failed
fixture 2[0][0.999969482421875]Failed
fixture 3[][]Passed
fixture 4[-1][-0.5]Failed

SHA-256 / 1dbbd8312649f5622a27d49cd4efafe96e6b0c6cc2a2c084a839ce64d6f6e817

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(samples):
    return [x/32768 for x in samples]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([-32768, 0, 16384],)),[-1, 0, 0.5])
check('fixture 2',solve(*([32767],)),[0.999969482421875])
check('fixture 3',solve(*([],)),[])
check('fixture 4',solve(*([-16384],)),[-0.5])
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[-1.0, 0.0, 0.5][-1, 0, 0.5]Passed
fixture 2[0.999969482421875][0.999969482421875]Passed
fixture 3[][]Passed
fixture 4[-0.5][-0.5]Passed

SHA-256 / 2d2c3ed51015fd6b5c20a93b70021ab17601768a6f6100f940b034ba5356ea08

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

Case digest / 57a97093053439007528f8462844ae3eb1e70b0063f1299ff788b7ac13a81255