FAILURE MAP
← Case archive

FA-91781 / Digital signal filters / Open access

Impulse truncation stops inside the numerator span · case 01

A numerator with internal zeros such as [1, 0, 0, 1] is truncated before its last tap takes effect.

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

ROOT CAUSE

Quiet samples are counted from n = 0 instead of from n >= len(b) - 1.

VERIFIED REPAIR

Only count quiet samples once the feedforward part has been fully applied.

Unsuccessful approach: The attempted repair starts counting at len(b) - 2, one sample early.

Case contract

Input [b, a, eps, maxlen, hold]; normalize by a0 ("bad-a0"), compute the impulse response exactly and stop after hold consecutive samples with |h| < eps, counted only once n >= len(b) - 1 (any non-quiet sample resets the count), or at maxlen. Return the kept samples as fraction strings.

Why this case matters

FIR approximations of IIR filters truncate the impulse response; wrong stop rules cut real energy or run forever.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(x):
    b = [Fraction(v) for v in x[0]]
    a = [Fraction(v) for v in x[1]]
    eps, maxlen, hold = Fraction(x[2]), x[3], x[4]
    if not a or a[0] == 0:
        return 'bad-a0'
    b = [v / a[0] for v in b]
    a = [v / a[0] for v in a]
    h = []
    quiet = 0
    for n in range(maxlen):
        acc = b[n] if n < len(b) else Fraction(0)
        for k in range(1, len(a)):
            if n - k >= 0:
                acc -= a[k] * h[n - k]
        h.append(acc)
        if abs(acc) < eps:
            quiet += 1
            if quiet >= hold:
                break
        else:
            quiet = 0
    return [str(v) for v in h]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: negative alternating tail', [['1'], ['1', '1/2'], '1/8', 12, 2], ['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']], ['control: exact epsilon boundary', [['1'], ['1', '-1/2'], '1/8', 12, 1], ['1', '1/2', '1/4', '1/8', '1/16']], ['control: zero taps inside fir part', [['1', '0', '0', '1'], ['1', '-1/2'], '1/100', 12, 1], ['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']], ['control: a0 not one', [['2', '1'], ['2', '-1'], '1/16', 10, 2], ['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']], ['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']]], [['regression: random impulse 45', [['0', '-1', '1'], ['1', '1/3', '1/4'], '1/10', 6, 1], ['0', '-1', '4/3', '-7/36', '-29/108', '179/1296']], ['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['control: bad a0', [['1'], ['0', '1'], '1/8', 5, 1], 'bad-a0'], ['control: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['control: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']]], [['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']], ['regression: random impulse 45', [['0', '-1', '1'], ['1', '1/3', '1/4'], '1/10', 6, 1], ['0', '-1', '4/3', '-7/36', '-29/108', '179/1296']], ['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['control: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['control: random impulse 0', [['0', '1', '1'], ['2', '1/2', '1/3'], '1/16', 9, 3], ['0', '1/2', '3/8', '-17/96', '-7/384', '157/4608', '-101/18432']], ['control: random impulse 1', [['1', '1/2', '2'], ['-1', '1/3'], '1/16', 7, 1], ['-1', '-5/6', '-41/18', '-41/54', '-41/162', '-41/486', '-41/1458']], ['control: random impulse 2', [['0', '1/2', '-1'], ['1', '1/2'], '1/4', 8, 3], ['0', '1/2', '-5/4', '5/8', '-5/16', '5/32', '-5/64', '5/128']]], [['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']], ['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['control: random impulse 3', [['-1', '-1', '1/2'], ['-1', '-1/4'], '1/8', 12, 3], ['1', '3/4', '-11/16', '11/64', '-11/256', '11/1024', '-11/4096']], ['control: random impulse 4', [['2'], ['-1', '1/4'], '1/10', 9, 1], ['-2', '-1/2', '-1/8', '-1/32']], ['control: random impulse 5', [['1'], ['-1', '1/3'], '1/8', 9, 2], ['-1', '-1/3', '-1/9', '-1/27']], ['control: random impulse 6', [['-1', '1', '-1'], ['1', '1/2', '1/2'], '1/16', 9, 3], ['-1', '3/2', '-5/4', '-1/8', '11/16', '-9/32', '-13/64', '31/128', '-5/256']]], [['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: random impulse 7', [['-1', '1', '-1'], ['1', '1/2'], '1/16', 11, 3], ['-1', '3/2', '-7/4', '7/8', '-7/16', '7/32', '-7/64', '7/128', '-7/256', '7/512']], ['control: random impulse 8', [['1/2', '2', '-1'], ['-1', '1/4'], '1/8', 5, 1], ['-1/2', '-17/8', '15/32', '15/128']], ['control: random impulse 9', [['1'], ['-1', '1/4'], '1/8', 9, 3], ['-1', '-1/4', '-1/16', '-1/64', '-1/256']], ['control: random impulse 10', [['-1'], ['-1', '-1/4', '0'], '1/16', 12, 1], ['1', '-1/4', '1/16', '-1/64']], ['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
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
regression: gap inside numerator['1', '0']['1', '0', '1', '0']Failed
regression: gap inside numerator with pole['1', '-1/4', '1/16']['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']Failed
control: negative alternating tail['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']Passed
control: exact epsilon boundary['1', '1/2', '1/4', '1/8', '1/16']['1', '1/2', '1/4', '1/8', '1/16']Passed
control: zero taps inside fir part['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']Passed
control: a0 not one['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']Passed
regression: two gaps in numerator['1', '0', '0']['1', '0', '0', '-1', '0', '0']Failed

SHA-256 / c37c8f39b73de2625037ecd34843771296baf999736a6c3b05423545d42ec39b

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(x):
    b = [Fraction(v) for v in x[0]]
    a = [Fraction(v) for v in x[1]]
    eps, maxlen, hold = Fraction(x[2]), x[3], x[4]
    if not a or a[0] == 0:
        return 'bad-a0'
    b = [v / a[0] for v in b]
    a = [v / a[0] for v in a]
    h = []
    quiet = 0
    for n in range(maxlen):
        acc = b[n] if n < len(b) else Fraction(0)
        for k in range(1, len(a)):
            if n - k >= 0:
                acc -= a[k] * h[n - k]
        h.append(acc)
        if n >= len(b) - 2 and abs(acc) < eps:
            quiet += 1
            if quiet >= hold:
                break
        else:
            quiet = 0
    return [str(v) for v in h]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: negative alternating tail', [['1'], ['1', '1/2'], '1/8', 12, 2], ['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']], ['control: exact epsilon boundary', [['1'], ['1', '-1/2'], '1/8', 12, 1], ['1', '1/2', '1/4', '1/8', '1/16']], ['control: zero taps inside fir part', [['1', '0', '0', '1'], ['1', '-1/2'], '1/100', 12, 1], ['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']], ['control: a0 not one', [['2', '1'], ['2', '-1'], '1/16', 10, 2], ['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']], ['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']]], [['regression: random impulse 45', [['0', '-1', '1'], ['1', '1/3', '1/4'], '1/10', 6, 1], ['0', '-1', '4/3', '-7/36', '-29/108', '179/1296']], ['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['control: bad a0', [['1'], ['0', '1'], '1/8', 5, 1], 'bad-a0'], ['control: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['control: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']]], [['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']], ['regression: random impulse 45', [['0', '-1', '1'], ['1', '1/3', '1/4'], '1/10', 6, 1], ['0', '-1', '4/3', '-7/36', '-29/108', '179/1296']], ['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['control: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['control: random impulse 0', [['0', '1', '1'], ['2', '1/2', '1/3'], '1/16', 9, 3], ['0', '1/2', '3/8', '-17/96', '-7/384', '157/4608', '-101/18432']], ['control: random impulse 1', [['1', '1/2', '2'], ['-1', '1/3'], '1/16', 7, 1], ['-1', '-5/6', '-41/18', '-41/54', '-41/162', '-41/486', '-41/1458']], ['control: random impulse 2', [['0', '1/2', '-1'], ['1', '1/2'], '1/4', 8, 3], ['0', '1/2', '-5/4', '5/8', '-5/16', '5/32', '-5/64', '5/128']]], [['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']], ['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['control: random impulse 3', [['-1', '-1', '1/2'], ['-1', '-1/4'], '1/8', 12, 3], ['1', '3/4', '-11/16', '11/64', '-11/256', '11/1024', '-11/4096']], ['control: random impulse 4', [['2'], ['-1', '1/4'], '1/10', 9, 1], ['-2', '-1/2', '-1/8', '-1/32']], ['control: random impulse 5', [['1'], ['-1', '1/3'], '1/8', 9, 2], ['-1', '-1/3', '-1/9', '-1/27']], ['control: random impulse 6', [['-1', '1', '-1'], ['1', '1/2', '1/2'], '1/16', 9, 3], ['-1', '3/2', '-5/4', '-1/8', '11/16', '-9/32', '-13/64', '31/128', '-5/256']]], [['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: random impulse 7', [['-1', '1', '-1'], ['1', '1/2'], '1/16', 11, 3], ['-1', '3/2', '-7/4', '7/8', '-7/16', '7/32', '-7/64', '7/128', '-7/256', '7/512']], ['control: random impulse 8', [['1/2', '2', '-1'], ['-1', '1/4'], '1/8', 5, 1], ['-1/2', '-17/8', '15/32', '15/128']], ['control: random impulse 9', [['1'], ['-1', '1/4'], '1/8', 9, 3], ['-1', '-1/4', '-1/16', '-1/64', '-1/256']], ['control: random impulse 10', [['-1'], ['-1', '-1/4', '0'], '1/16', 12, 1], ['1', '-1/4', '1/16', '-1/64']], ['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
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
regression: gap inside numerator['1', '0']['1', '0', '1', '0']Failed
regression: gap inside numerator with pole['1', '-1/4', '1/16']['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']Failed
control: negative alternating tail['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']Passed
control: exact epsilon boundary['1', '1/2', '1/4', '1/8', '1/16']['1', '1/2', '1/4', '1/8', '1/16']Passed
control: zero taps inside fir part['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']Passed
control: a0 not one['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']Passed
regression: two gaps in numerator['1', '0', '0', '-1', '0', '0']['1', '0', '0', '-1', '0', '0']Passed

SHA-256 / 2946da5f01ea126895cc31b0f6bd399ed26a655fdcc579401696ba39a2e88e09

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(x):
    b = [Fraction(v) for v in x[0]]
    a = [Fraction(v) for v in x[1]]
    eps, maxlen, hold = Fraction(x[2]), x[3], x[4]
    if not a or a[0] == 0:
        return 'bad-a0'
    b = [v / a[0] for v in b]
    a = [v / a[0] for v in a]
    h = []
    quiet = 0
    for n in range(maxlen):
        acc = b[n] if n < len(b) else Fraction(0)
        for k in range(1, len(a)):
            if n - k >= 0:
                acc -= a[k] * h[n - k]
        h.append(acc)
        if n >= len(b) - 1 and abs(acc) < eps:
            quiet += 1
            if quiet >= hold:
                break
        else:
            quiet = 0
    return [str(v) for v in h]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: negative alternating tail', [['1'], ['1', '1/2'], '1/8', 12, 2], ['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']], ['control: exact epsilon boundary', [['1'], ['1', '-1/2'], '1/8', 12, 1], ['1', '1/2', '1/4', '1/8', '1/16']], ['control: zero taps inside fir part', [['1', '0', '0', '1'], ['1', '-1/2'], '1/100', 12, 1], ['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']], ['control: a0 not one', [['2', '1'], ['2', '-1'], '1/16', 10, 2], ['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']], ['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']]], [['regression: random impulse 45', [['0', '-1', '1'], ['1', '1/3', '1/4'], '1/10', 6, 1], ['0', '-1', '4/3', '-7/36', '-29/108', '179/1296']], ['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: noisy tail resets hold', [['1'], ['1', '0', '1/4'], '1/10', 12, 3], ['1', '0', '-1/4', '0', '1/16', '0']], ['control: bad a0', [['1'], ['0', '1'], '1/8', 5, 1], 'bad-a0'], ['control: sparse echo hold 4', [['1'], ['1', '0', '0', '0', '-1/2'], '1/3', 20, 4], ['1', '0', '0', '0', '1/2', '0', '0', '0', '1/4']], ['control: sparse echo hold 3', [['1'], ['1', '0', '0', '-1/2'], '1/3', 20, 3], ['1', '0', '0', '1/2', '0', '0', '1/4']]], [['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']], ['regression: random impulse 45', [['0', '-1', '1'], ['1', '1/3', '1/4'], '1/10', 6, 1], ['0', '-1', '4/3', '-7/36', '-29/108', '179/1296']], ['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['control: sparse negative echo hold 3', [['2'], ['1', '0', '0', '1/2'], '1/2', 20, 3], ['2', '0', '0', '-1', '0', '0', '1/2', '0', '0', '-1/4']], ['control: random impulse 0', [['0', '1', '1'], ['2', '1/2', '1/3'], '1/16', 9, 3], ['0', '1/2', '3/8', '-17/96', '-7/384', '157/4608', '-101/18432']], ['control: random impulse 1', [['1', '1/2', '2'], ['-1', '1/3'], '1/16', 7, 1], ['-1', '-5/6', '-41/18', '-41/54', '-41/162', '-41/486', '-41/1458']], ['control: random impulse 2', [['0', '1/2', '-1'], ['1', '1/2'], '1/4', 8, 3], ['0', '1/2', '-5/4', '5/8', '-5/16', '5/32', '-5/64', '5/128']]], [['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']], ['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['control: random impulse 3', [['-1', '-1', '1/2'], ['-1', '-1/4'], '1/8', 12, 3], ['1', '3/4', '-11/16', '11/64', '-11/256', '11/1024', '-11/4096']], ['control: random impulse 4', [['2'], ['-1', '1/4'], '1/10', 9, 1], ['-2', '-1/2', '-1/8', '-1/32']], ['control: random impulse 5', [['1'], ['-1', '1/3'], '1/8', 9, 2], ['-1', '-1/3', '-1/9', '-1/27']], ['control: random impulse 6', [['-1', '1', '-1'], ['1', '1/2', '1/2'], '1/16', 9, 3], ['-1', '3/2', '-5/4', '-1/8', '11/16', '-9/32', '-13/64', '31/128', '-5/256']]], [['regression: gap inside numerator', [['1', '0', '1'], ['1'], '1/2', 8, 1], ['1', '0', '1', '0']], ['regression: gap inside numerator with pole', [['1', '0', '0', '2'], ['1', '1/4'], '1/8', 10, 1], ['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']], ['control: random impulse 7', [['-1', '1', '-1'], ['1', '1/2'], '1/16', 11, 3], ['-1', '3/2', '-7/4', '7/8', '-7/16', '7/32', '-7/64', '7/128', '-7/256', '7/512']], ['control: random impulse 8', [['1/2', '2', '-1'], ['-1', '1/4'], '1/8', 5, 1], ['-1/2', '-17/8', '15/32', '15/128']], ['control: random impulse 9', [['1'], ['-1', '1/4'], '1/8', 9, 3], ['-1', '-1/4', '-1/16', '-1/64', '-1/256']], ['control: random impulse 10', [['-1'], ['-1', '-1/4', '0'], '1/16', 12, 1], ['1', '-1/4', '1/16', '-1/64']], ['regression: two gaps in numerator', [['1', '0', '0', '-1'], ['1'], '1/2', 8, 2], ['1', '0', '0', '-1', '0', '0']]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(args), expected)
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
regression: gap inside numerator['1', '0', '1', '0']['1', '0', '1', '0']Passed
regression: gap inside numerator with pole['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']['1', '-1/4', '1/16', '127/64', '-127/256', '127/1024']Passed
control: negative alternating tail['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']['1', '-1/2', '1/4', '-1/8', '1/16', '-1/32']Passed
control: exact epsilon boundary['1', '1/2', '1/4', '1/8', '1/16']['1', '1/2', '1/4', '1/8', '1/16']Passed
control: zero taps inside fir part['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']['1', '1/2', '1/4', '9/8', '9/16', '9/32', '9/64', '9/128', '9/256', '9/512', '9/1024']Passed
control: a0 not one['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']['1', '1', '1/2', '1/4', '1/8', '1/16', '1/32', '1/64']Passed
regression: two gaps in numerator['1', '0', '0', '-1', '0', '0']['1', '0', '0', '-1', '0', '0']Passed

SHA-256 / 2529c99a34fbd468ee8b915527177d0f01b2117b9ecf6b649a257926885c0e80

Verification & scope

A deterministic bounded teaching model with a stipulated toy contract; exact rational arithmetic or fixed-decimal rounding keeps outputs strict JSON. It is not a production DSP library and claims no standards 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:51:39.351197+00:00.

Case digest / d43a54fb0a3973715e240e27c2cd293208fe1edae7912674b32da4107275e810