FA-91366 / Digital signal filters / Open access
Biquad normalizes feedforward but not feedback by a0 · case 01
With a0 = 2 the poles are twice as strong as specified and the filter can blow up.
ROOT CAUSE
Only the b coefficients are divided by a0; a1 and a2 are used raw.
VERIFIED REPAIR
Divide all coefficients by a0.
Unsuccessful approach: The attempted repair divides the feedback coefficients by a0 squared.
Case contract
Input [[b0, b1, b2, a0, a1, a2], samples]; coefficients are rational strings, normalized by a0 ("a0-zero" if a0 == 0). y[n] = b0 x[n] + b1 x[n-1] + b2 x[n-2] - a1 y[n-1] - a2 y[n-2] with zero initial state; return outputs as exact fraction strings.
Why this case matters
The biquad is the workhorse IIR section; sign, state or normalization slips produce unstable or wrong-gain filters.
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):
b0, b1, b2, a0, a1, a2 = [Fraction(v) for v in x[0]]
if a0 == 0:
return 'a0-zero'
b0, b1, b2 = b0 / a0, b1 / a0, b2 / a0
x1 = x2 = y1 = y2 = Fraction(0)
out = []
for s in x[1]:
y = b0 * s + b1 * x1 + b2 * x2 - a1 * y1 - a2 * y2
x2, x1 = x1, s
y2, y1 = y1, y
out.append(str(y))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: a0 not one', [['2', '1', '0', '2', '1', '1/2'], [2, 0, 0, 1]], ['2', '0', '-1/2', '5/4']], ['regression: random biquad 0', [['1/3', '3/4', '1/2', '-1', '2', '1/3'], [2, 2]], ['-2/3', '-7/2']], ['regression: random biquad 1', [['1/8', '-1/4', '3/4', '2', '1/2', '1/8'], [-2, 1, 2, 2, 0, 2]], ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096']], ['control: pure feedback impulse', [['1', '0', '0', '1', '-1/2', '0'], [1, 0, 0, 0]], ['1', '1/2', '1/4', '1/8']], ['control: second order feedback', [['1', '0', '0', '1', '0', '1/4'], [1, 0, 0, 0, 0]], ['1', '0', '-1/4', '0', '1/16']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 6', [['1/8', '0', '5/4', '1', '-1/2', '5/4'], [1, 1, 1, 0, 3, 2]], ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128']]], [['regression: random biquad 2', [['1/2', '5/4', '1/2', '-1', '-1/2', '-1/2'], [-2, -2, 3, -3, 1]], ['1', '3', '0', '-11/4', '25/8']], ['regression: random biquad 3', [['-3/8', '5/4', '1/2', '2', '5/4', '1/8'], [-2, 0, -1, 3]], ['3/8', '-95/64', '303/512', '-5999/4096']], ['regression: random biquad 1', [['1/8', '-1/4', '3/4', '2', '1/2', '1/8'], [-2, 1, 2, 2, 0, 2]], ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 10', [['3/4', '2', '1/2', '1', '-3/8', '1/3'], [2, 2, -3]], ['3/2', '97/16', '579/128']], ['control: random biquad 11', [['1/2', '3/4', '0', '1', '1/3', '5/4'], [-3, 3, -3, 0, 2]], ['-3/2', '-1/4', '65/24', '-409/144', '-1243/864']]], [['regression: random biquad 5', [['1/2', '0', '-1/2', '-1', '-1/2', '-3/8'], [0, 2, -2, -1, 1]], ['0', '-1', '3/2', '9/8', '-21/8']], ['regression: random biquad 9', [['3/4', '1/3', '1/2', '-1', '0', '1/8'], [-1, -1, 2]], ['3/4', '13/12', '-55/96']], ['regression: random biquad 3', [['-3/8', '5/4', '1/2', '2', '5/4', '1/8'], [-2, 0, -1, 3]], ['3/8', '-95/64', '303/512', '-5999/4096']], ['control: random biquad 14', [['-1/4', '1/8', '-1/4', '1', '5/4', '0'], [-2, -3, -3, -2]], ['1/2', '-1/8', '33/32', '-53/128']], ['control: random biquad 20', [['2', '1/2', '-1/2', '1', '3/4', '2'], [0, 1, 0]], ['0', '2', '-1']], ['control: random biquad 23', [['-3/8', '2', '2', '1', '-3/8', '3/4'], [0, -1, 3, 3, -3]], ['0', '3/8', '-191/64', '755/512', '65193/4096']], ['control: random biquad 24', [['0', '-3/8', '3/4', '1', '-1/4', '1/2'], [-1, -2, -3, 1, 1]], ['0', '3/8', '3/32', '-69/128', '-1437/512']]], [['regression: random biquad 13', [['1/8', '-1/4', '5/4', '2', '-1/4', '1/2'], [1, -1, 2]], ['1/16', '-23/128', '857/1024']], ['regression: random biquad 15', [['1/8', '-1/4', '3/4', '-1', '-1/2', '2'], [-2, -3]], ['1/4', '-1/4']], ['regression: random biquad 5', [['1/2', '0', '-1/2', '-1', '-1/2', '-3/8'], [0, 2, -2, -1, 1]], ['0', '-1', '3/2', '9/8', '-21/8']], ['control: random biquad 28', [['-3/8', '1/8', '-1/2', '1', '3/4', '3/4'], [-3, -1]], ['9/8', '-27/32']], ['control: random biquad 29', [['-1/2', '1/2', '1/8', '1', '-1/4', '2'], [-2, -2, 0, -1]], ['1', '1/4', '-51/16', '-67/64']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']], ['control: random biquad 32', [['3/4', '-1/2', '-3/8', '1', '2', '1/2'], [-2, 3, -2, -3]], ['-3/2', '25/4', '-14', '45/2']]], [['regression: random biquad 17', [['1/3', '1/2', '3/4', '1/2', '5/4', '1/2'], [-2, 3, 0]], ['-4/3', '10/3', '-7']], ['regression: random biquad 18', [['0', '1/2', '0', '1/2', '-1/2', '3/4'], [-3, -1, -3]], ['0', '-3', '-4']], ['regression: random biquad 12', [['-3/8', '1/3', '5/4', '2', '2', '2'], [2, 2]], ['-3/8', '1/3']], ['control: random biquad 33', [['-3/8', '2', '1/8', '1', '-3/8', '0'], [2, -1]], ['-3/4', '131/32']], ['control: random biquad 37', [['5/4', '-1/2', '-3/8', '1', '5/4', '3/4'], [2, 0, 0, 1]], ['5/2', '-33/8', '81/32', '151/128']], ['control: random biquad 40', [['1/8', '2', '1/8', '1', '5/4', '3/4'], [0, -1, -2, 2]], ['0', '-1/8', '-67/32', '-149/128']], ['control: random biquad 42', [['-3/8', '3/4', '0', '1', '-1/4', '1/8'], [2, 2, -1, -3, -3, -2]], ['-3/4', '9/16', '135/64', '213/256', '-1209/1024', '-7779/4096']]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: a0 not one | ['2', '-1', '0', '3/2'] | ['2', '0', '-1/2', '5/4'] | Failed |
| regression: random biquad 0 | ['-2/3', '-5/6'] | ['-2/3', '-7/2'] | Failed |
| regression: random biquad 1 | ['-1/8', '3/8', '-59/64', '85/128', '145/512', '333/512'] | ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096'] | Failed |
| control: pure feedback impulse | ['1', '1/2', '1/4', '1/8'] | ['1', '1/2', '1/4', '1/8'] | Passed |
| control: second order feedback | ['1', '0', '-1/4', '0', '1/16'] | ['1', '0', '-1/4', '0', '1/16'] | Passed |
| control: fir only | ['1', '4', '8'] | ['1', '4', '8'] | Passed |
| control: random biquad 6 | ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128'] | ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128'] | Passed |
SHA-256 / 00559e63ae61781ee82db2aadc50acb152413e554eb2bb465ee91e622aaaaa58
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):
b0, b1, b2, a0, a1, a2 = [Fraction(v) for v in x[0]]
if a0 == 0:
return 'a0-zero'
b0, b1, b2, a1, a2 = b0 / a0, b1 / a0, b2 / a0, a1 / a0 / a0, a2 / a0 / a0
x1 = x2 = y1 = y2 = Fraction(0)
out = []
for s in x[1]:
y = b0 * s + b1 * x1 + b2 * x2 - a1 * y1 - a2 * y2
x2, x1 = x1, s
y2, y1 = y1, y
out.append(str(y))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: a0 not one', [['2', '1', '0', '2', '1', '1/2'], [2, 0, 0, 1]], ['2', '0', '-1/2', '5/4']], ['regression: random biquad 0', [['1/3', '3/4', '1/2', '-1', '2', '1/3'], [2, 2]], ['-2/3', '-7/2']], ['regression: random biquad 1', [['1/8', '-1/4', '3/4', '2', '1/2', '1/8'], [-2, 1, 2, 2, 0, 2]], ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096']], ['control: pure feedback impulse', [['1', '0', '0', '1', '-1/2', '0'], [1, 0, 0, 0]], ['1', '1/2', '1/4', '1/8']], ['control: second order feedback', [['1', '0', '0', '1', '0', '1/4'], [1, 0, 0, 0, 0]], ['1', '0', '-1/4', '0', '1/16']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 6', [['1/8', '0', '5/4', '1', '-1/2', '5/4'], [1, 1, 1, 0, 3, 2]], ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128']]], [['regression: random biquad 2', [['1/2', '5/4', '1/2', '-1', '-1/2', '-1/2'], [-2, -2, 3, -3, 1]], ['1', '3', '0', '-11/4', '25/8']], ['regression: random biquad 3', [['-3/8', '5/4', '1/2', '2', '5/4', '1/8'], [-2, 0, -1, 3]], ['3/8', '-95/64', '303/512', '-5999/4096']], ['regression: random biquad 1', [['1/8', '-1/4', '3/4', '2', '1/2', '1/8'], [-2, 1, 2, 2, 0, 2]], ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 10', [['3/4', '2', '1/2', '1', '-3/8', '1/3'], [2, 2, -3]], ['3/2', '97/16', '579/128']], ['control: random biquad 11', [['1/2', '3/4', '0', '1', '1/3', '5/4'], [-3, 3, -3, 0, 2]], ['-3/2', '-1/4', '65/24', '-409/144', '-1243/864']]], [['regression: random biquad 5', [['1/2', '0', '-1/2', '-1', '-1/2', '-3/8'], [0, 2, -2, -1, 1]], ['0', '-1', '3/2', '9/8', '-21/8']], ['regression: random biquad 9', [['3/4', '1/3', '1/2', '-1', '0', '1/8'], [-1, -1, 2]], ['3/4', '13/12', '-55/96']], ['regression: random biquad 3', [['-3/8', '5/4', '1/2', '2', '5/4', '1/8'], [-2, 0, -1, 3]], ['3/8', '-95/64', '303/512', '-5999/4096']], ['control: random biquad 14', [['-1/4', '1/8', '-1/4', '1', '5/4', '0'], [-2, -3, -3, -2]], ['1/2', '-1/8', '33/32', '-53/128']], ['control: random biquad 20', [['2', '1/2', '-1/2', '1', '3/4', '2'], [0, 1, 0]], ['0', '2', '-1']], ['control: random biquad 23', [['-3/8', '2', '2', '1', '-3/8', '3/4'], [0, -1, 3, 3, -3]], ['0', '3/8', '-191/64', '755/512', '65193/4096']], ['control: random biquad 24', [['0', '-3/8', '3/4', '1', '-1/4', '1/2'], [-1, -2, -3, 1, 1]], ['0', '3/8', '3/32', '-69/128', '-1437/512']]], [['regression: random biquad 13', [['1/8', '-1/4', '5/4', '2', '-1/4', '1/2'], [1, -1, 2]], ['1/16', '-23/128', '857/1024']], ['regression: random biquad 15', [['1/8', '-1/4', '3/4', '-1', '-1/2', '2'], [-2, -3]], ['1/4', '-1/4']], ['regression: random biquad 5', [['1/2', '0', '-1/2', '-1', '-1/2', '-3/8'], [0, 2, -2, -1, 1]], ['0', '-1', '3/2', '9/8', '-21/8']], ['control: random biquad 28', [['-3/8', '1/8', '-1/2', '1', '3/4', '3/4'], [-3, -1]], ['9/8', '-27/32']], ['control: random biquad 29', [['-1/2', '1/2', '1/8', '1', '-1/4', '2'], [-2, -2, 0, -1]], ['1', '1/4', '-51/16', '-67/64']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']], ['control: random biquad 32', [['3/4', '-1/2', '-3/8', '1', '2', '1/2'], [-2, 3, -2, -3]], ['-3/2', '25/4', '-14', '45/2']]], [['regression: random biquad 17', [['1/3', '1/2', '3/4', '1/2', '5/4', '1/2'], [-2, 3, 0]], ['-4/3', '10/3', '-7']], ['regression: random biquad 18', [['0', '1/2', '0', '1/2', '-1/2', '3/4'], [-3, -1, -3]], ['0', '-3', '-4']], ['regression: random biquad 12', [['-3/8', '1/3', '5/4', '2', '2', '2'], [2, 2]], ['-3/8', '1/3']], ['control: random biquad 33', [['-3/8', '2', '1/8', '1', '-3/8', '0'], [2, -1]], ['-3/4', '131/32']], ['control: random biquad 37', [['5/4', '-1/2', '-3/8', '1', '5/4', '3/4'], [2, 0, 0, 1]], ['5/2', '-33/8', '81/32', '151/128']], ['control: random biquad 40', [['1/8', '2', '1/8', '1', '5/4', '3/4'], [0, -1, -2, 2]], ['0', '-1/8', '-67/32', '-149/128']], ['control: random biquad 42', [['-3/8', '3/4', '0', '1', '-1/4', '1/8'], [2, 2, -1, -3, -3, -2]], ['-3/4', '9/16', '135/64', '213/256', '-1209/1024', '-7779/4096']]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: a0 not one | ['2', '1/2', '-3/8', '33/32'] | ['2', '0', '-1/2', '5/4'] | Failed |
| regression: random biquad 0 | ['-2/3', '-5/6'] | ['-2/3', '-7/2'] | Failed |
| regression: random biquad 1 | ['-1/8', '21/64', '-403/512', '1385/4096', '15805/32768', '210801/262144'] | ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096'] | Failed |
| control: pure feedback impulse | ['1', '1/2', '1/4', '1/8'] | ['1', '1/2', '1/4', '1/8'] | Passed |
| control: second order feedback | ['1', '0', '-1/4', '0', '1/16'] | ['1', '0', '-1/4', '0', '1/16'] | Passed |
| control: fir only | ['1', '4', '8'] | ['1', '4', '8'] | Passed |
| control: random biquad 6 | ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128'] | ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128'] | Passed |
SHA-256 / ad4277c8b235fa597779222381692ac63bcfbccd3e8e36a8d7aaed162fb34ee6
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):
b0, b1, b2, a0, a1, a2 = [Fraction(v) for v in x[0]]
if a0 == 0:
return 'a0-zero'
b0, b1, b2, a1, a2 = b0 / a0, b1 / a0, b2 / a0, a1 / a0, a2 / a0
x1 = x2 = y1 = y2 = Fraction(0)
out = []
for s in x[1]:
y = b0 * s + b1 * x1 + b2 * x2 - a1 * y1 - a2 * y2
x2, x1 = x1, s
y2, y1 = y1, y
out.append(str(y))
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression: a0 not one', [['2', '1', '0', '2', '1', '1/2'], [2, 0, 0, 1]], ['2', '0', '-1/2', '5/4']], ['regression: random biquad 0', [['1/3', '3/4', '1/2', '-1', '2', '1/3'], [2, 2]], ['-2/3', '-7/2']], ['regression: random biquad 1', [['1/8', '-1/4', '3/4', '2', '1/2', '1/8'], [-2, 1, 2, 2, 0, 2]], ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096']], ['control: pure feedback impulse', [['1', '0', '0', '1', '-1/2', '0'], [1, 0, 0, 0]], ['1', '1/2', '1/4', '1/8']], ['control: second order feedback', [['1', '0', '0', '1', '0', '1/4'], [1, 0, 0, 0, 0]], ['1', '0', '-1/4', '0', '1/16']], ['control: fir only', [['1', '2', '1', '1', '0', '0'], [1, 2, 3]], ['1', '4', '8']], ['control: random biquad 6', [['1/8', '0', '5/4', '1', '-1/2', '5/4'], [1, 1, 1, 0, 3, 2]], ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128']]], [['regression: random biquad 2', [['1/2', '5/4', '1/2', '-1', '-1/2', '-1/2'], [-2, -2, 3, -3, 1]], ['1', '3', '0', '-11/4', '25/8']], ['regression: random biquad 3', [['-3/8', '5/4', '1/2', '2', '5/4', '1/8'], [-2, 0, -1, 3]], ['3/8', '-95/64', '303/512', '-5999/4096']], ['regression: random biquad 1', [['1/8', '-1/4', '3/4', '2', '1/2', '1/8'], [-2, 1, 2, 2, 0, 2]], ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096']], ['control: random biquad 7', [['-3/8', '0', '-1/4', '1', '2', '1/8'], [0, 3]], ['0', '-9/8']], ['control: random biquad 8', [['0', '1/2', '3/4', '-1', '3/4', '0'], [-3, 0]], ['0', '3/2']], ['control: random biquad 10', [['3/4', '2', '1/2', '1', '-3/8', '1/3'], [2, 2, -3]], ['3/2', '97/16', '579/128']], ['control: random biquad 11', [['1/2', '3/4', '0', '1', '1/3', '5/4'], [-3, 3, -3, 0, 2]], ['-3/2', '-1/4', '65/24', '-409/144', '-1243/864']]], [['regression: random biquad 5', [['1/2', '0', '-1/2', '-1', '-1/2', '-3/8'], [0, 2, -2, -1, 1]], ['0', '-1', '3/2', '9/8', '-21/8']], ['regression: random biquad 9', [['3/4', '1/3', '1/2', '-1', '0', '1/8'], [-1, -1, 2]], ['3/4', '13/12', '-55/96']], ['regression: random biquad 3', [['-3/8', '5/4', '1/2', '2', '5/4', '1/8'], [-2, 0, -1, 3]], ['3/8', '-95/64', '303/512', '-5999/4096']], ['control: random biquad 14', [['-1/4', '1/8', '-1/4', '1', '5/4', '0'], [-2, -3, -3, -2]], ['1/2', '-1/8', '33/32', '-53/128']], ['control: random biquad 20', [['2', '1/2', '-1/2', '1', '3/4', '2'], [0, 1, 0]], ['0', '2', '-1']], ['control: random biquad 23', [['-3/8', '2', '2', '1', '-3/8', '3/4'], [0, -1, 3, 3, -3]], ['0', '3/8', '-191/64', '755/512', '65193/4096']], ['control: random biquad 24', [['0', '-3/8', '3/4', '1', '-1/4', '1/2'], [-1, -2, -3, 1, 1]], ['0', '3/8', '3/32', '-69/128', '-1437/512']]], [['regression: random biquad 13', [['1/8', '-1/4', '5/4', '2', '-1/4', '1/2'], [1, -1, 2]], ['1/16', '-23/128', '857/1024']], ['regression: random biquad 15', [['1/8', '-1/4', '3/4', '-1', '-1/2', '2'], [-2, -3]], ['1/4', '-1/4']], ['regression: random biquad 5', [['1/2', '0', '-1/2', '-1', '-1/2', '-3/8'], [0, 2, -2, -1, 1]], ['0', '-1', '3/2', '9/8', '-21/8']], ['control: random biquad 28', [['-3/8', '1/8', '-1/2', '1', '3/4', '3/4'], [-3, -1]], ['9/8', '-27/32']], ['control: random biquad 29', [['-1/2', '1/2', '1/8', '1', '-1/4', '2'], [-2, -2, 0, -1]], ['1', '1/4', '-51/16', '-67/64']], ['control: random biquad 30', [['0', '0', '1/8', '1', '0', '-1/2'], [1, -2, 1]], ['0', '0', '1/8']], ['control: random biquad 32', [['3/4', '-1/2', '-3/8', '1', '2', '1/2'], [-2, 3, -2, -3]], ['-3/2', '25/4', '-14', '45/2']]], [['regression: random biquad 17', [['1/3', '1/2', '3/4', '1/2', '5/4', '1/2'], [-2, 3, 0]], ['-4/3', '10/3', '-7']], ['regression: random biquad 18', [['0', '1/2', '0', '1/2', '-1/2', '3/4'], [-3, -1, -3]], ['0', '-3', '-4']], ['regression: random biquad 12', [['-3/8', '1/3', '5/4', '2', '2', '2'], [2, 2]], ['-3/8', '1/3']], ['control: random biquad 33', [['-3/8', '2', '1/8', '1', '-3/8', '0'], [2, -1]], ['-3/4', '131/32']], ['control: random biquad 37', [['5/4', '-1/2', '-3/8', '1', '5/4', '3/4'], [2, 0, 0, 1]], ['5/2', '-33/8', '81/32', '151/128']], ['control: random biquad 40', [['1/8', '2', '1/8', '1', '5/4', '3/4'], [0, -1, -2, 2]], ['0', '-1/8', '-67/32', '-149/128']], ['control: random biquad 42', [['-3/8', '3/4', '0', '1', '-1/4', '1/8'], [2, 2, -1, -3, -3, -2]], ['-3/4', '9/16', '135/64', '213/256', '-1209/1024', '-7779/4096']]]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: a0 not one | ['2', '0', '-1/2', '5/4'] | ['2', '0', '-1/2', '5/4'] | Passed |
| regression: random biquad 0 | ['-2/3', '-7/2'] | ['-2/3', '-7/2'] | Passed |
| regression: random biquad 1 | ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096'] | ['-1/8', '11/32', '-53/64', '223/512', '907/2048', '3019/4096'] | Passed |
| control: pure feedback impulse | ['1', '1/2', '1/4', '1/8'] | ['1', '1/2', '1/4', '1/8'] | Passed |
| control: second order feedback | ['1', '0', '-1/4', '0', '1/16'] | ['1', '0', '-1/4', '0', '1/16'] | Passed |
| control: fir only | ['1', '4', '8'] | ['1', '4', '8'] | Passed |
| control: random biquad 6 | ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128'] | ['1/8', '3/16', '21/16', '107/64', '105/128', '-183/128'] | Passed |
SHA-256 / d44e97418c0dbaad1468177bcca33fa645fce6f800cc0b27f0e5f04be01b54da
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:35.429173+00:00.
Case digest / e1ca9147d997b2275b243a962712d88b7e184eecdbffafc41cac74b8cdd68a0c