Skip to content

rational: the guard band filter in both forms and the composition tests (IIR-c) - #114

Merged
tap merged 7 commits into
mainfrom
claude/sample-rate-solutions-comparison-mqc190
Nov 22, 2026
Merged

tap merged 7 commits into
mainfrom
claude/sample-rate-solutions-comparison-mqc190

Conversation

@tap

@tap tap commented Nov 22, 2026 •

Copy link
Copy Markdown
Owner

What this changes

IIR-c of docs/IIR_PLAN.md: rational gains the guard band filter, a 1:1 stage that a caller places in a tap::dsp::chain after a decimator or before an interpolator, FIR or recursive (I7, R26). This PR also adds the composition tests for mixed chains (I10, R27). The FIR stages, chains, matrix and C ABI are unchanged, and so are IIR-b's recursive stages.

  • guard_band.h: guard_band_filter<S, Ch, P> over guard_band_filter_base<S, P> (K12). P is a guard_phase:
    • nonlinear: the odd-order Chebyshev II, run by DspTap's biquad_cascade. Its latency is nominal (nominal_latency_output_frames, latency_deviation_output_frames, group_delay_output_frames(f)), and a chain holding it has no exact latency (a new compile-fail case).
    • linear: the even-length symmetric (type II) FIR, run by dot_row. Its latency is exact, latency_output_frames() = (N − 1)/2, so an all-FIR chain holding it keeps R7's exact latency.
    • Settings: guard_band_settings{passband_frac, stopband_atten_db, order}. The named settings super_economy() … transparent() use the profiles' numbers at orders 5 / 7 / 7 / 7 (question 14). Both forms reach A from the Chebyshev II's stop edge (stop_edge()). The named settings are compile-time or committed DspTap designs (k_guard_band_cheby2, k_guard_band_fir); any other setting is designed at construction.
    • Call shapes: the family's (process, pull, flush, reset, validate, outputs_for, frames_needed, window_frames, flush_output_frames, channels()). process, pull and flush are out of line, each against a cursor (A12).
  • The charter note: a 1:1 guard band stage is admitted beside the ratios, and ratio<L, M>'s static_assert is unchanged. Recorded in PLAN.md section 2, rational/PLAN.md section 1, rational/CLAUDE.md and the root README.
  • Tests:
    • the golden leg: tools/reference/make_guard_band_reference_vectors.py, scipy's own cheby2 design through sosfilt (checked against DspTap's transfer function to 1e-14) and the committed FIR taps through lfilter;
    • the battery tests/test_guard_band.cpp and the composition tests tests/test_iir_composition.cpp, built as an executable of their own, tap_sr_rational_guard_band_tests (see the notes);
    • the no-flush residue in tests/test_iir_subnormals.cpp;
    • the rational header count pinned at 9.
  • Docs: a new book chapter, book/src/part7/guard-band.md; the offering table in rational/README.md and the book; rational/PLAN.md R26–R28 and its verification record; the roadmap; and docs/IIR_PLAN.md v11, which records your decisions on questions 14, 16 (I10) and 19 and opens questions 20 and 21.
  • TAP_SR_VERSION stays 0.8.0 and the DspTap pin stays at v0.3.0. I11 (the C ABI, notebooks, ratchet workloads) and 0.9.0 are IIR-d's.

Why

This is the IIR plan's third step (section 5, item 4). Every half-band crosses over at the low rate's Nyquist: −3 dB there for the recursive half-band, −6 dB for the FIR one. Its transition band therefore folds onto the guard band (f_pass, r/2) going down, and images into it going up. The passband is alias-free with or without this filter; the filter removes the guard band as a whole. Its zero at Nyquist is exact in both forms and every format.

Verification

Each number is measured by the named test (asserted there against its bound or stated tolerance):

What Measured Test
Golden leg, max error of full scale (Chebyshev II / FIR) double 8.2e-15 / 4.4e-16, float 9.0e-7 / 6.8e-8, Q15 1.5e-5 / 2.4e-4, Q31 5.1e-9 / 3.9e-9 guard_band_test.MatchesTheGoldenLeg
Q15 / Q31 outputs bit-pinned, identical on x86-64, the M55 and Hexagon guard_band_fixed_test.OutputsAreBitPinned
Spec Chebyshev II: −A from its stop edge, 0 to −0.01 dB in the passband, ≤ −302 dB at Nyquist. FIR: −71.35 / −73.26 / −71.16 / −122.98 dB, ripple ≤ 0.0088 dB peak to peak guard_band.EachFormMeetsItsSpec
Zero at Nyquist exact: b0 == b1 in the first-order section, FIR taps symmetric bit for bit, a fixed-point Nyquist tone outputs exactly zero TheZeroAtNyquistIsExactInEveryFormat, TheLinearFormIsSymmetricBitForBit
Order rule worst guard-band alias −40.1 / −43.5 / −40.2 / −61.6 dB behind the nonlinear half-band guard_band.OrderIsTheLowestOddOrderWhoseGuardBandAliasIsAtHalfA
Latency Chebyshev II 0.38–0.54 frames at DC, deviation 1.84–6.76; group delay within 1.2e-13 frames of scipy's. Linear form exact, and an all-FIR chain holding it sums exactly (34 frames after the FIR ↓2 at economy, 68 before the FIR ↑2) NominalLatencyAndGroupDelayMatchTheImpulseResponse, GroupDelayMatchesTheGoldenLeg, TheLinearLatencyIsExact, iir_composition.TheLinearFormKeepsAnAllFirChainsExactLatency
Fixed point largest Chebyshev state 1.67 of full scale (limit 4); Q15 within 0.5 LSB of double, Q31 within 1.3e-8; Q15 floor −101.1 dB RMS; every state exactly zero within 321 (Q15) and 691 (Q31) frames after full-scale drive, inside the window; every coefficient of a 294-design grid within Q2.30 (largest 1.99996) FullScaleDriveNeverWrapsInside, Q15FloorsAgainstDouble, FixedPointSilenceIsExactlyZeroAfterTheWindow, EveryValidDesignFitsTheFixedPointFormats
The honest limit (question 19) the floating order-7 Chebyshev II settles at most 8.7× (float) / 10.4× (double) the smallest normal on x86-64, 6.2× / 6.5× on the M55, bound 16; orders 3 and 5 drain to exactly zero. A custom order of 9 or more is not measured here, and the header says so guard_band_float_test.TheChebyshevLimitCycleIsBounded
Without flush-to-zero Chebyshev residue at most 10× the smallest subnormal (bound 32); the FIR exact iir_subnormals.WithoutFlushToZeroTheGuardBandResidueIsBounded
Aliases, decimating by 2 in the passband ≤ −71.4 dB (70 dB settings) and −123.9 dB (transparent); past the stop edge ≤ −75.1 dB (−126.9) with either form, against −3.4 to −6.6 dB with no filter guard_band.AliasesLandOnlyAboveThePassbandEdge
Composition IIR ↑2 + FIR ↑3, FIR ↓3 + IIR ↓2, the filter before the FIR and near-linear interpolators, after the FIR decimator, after iir_down_by<…, 8> and down_by8: bit-identical for any chunking in all four formats. Flush equals zero padding bit for bit, except downstream of a cycling floating stage (within 64× the smallest normal) iir_composition_test.MixedChainsAreBitIdenticalForAnyChunking, FlushEqualsZeroPaddingBitForBitInMixedChains
Offering table all 48 cells: multiplies, nominal latency and deviation iir_composition.TheOfferingTableIsMeasured

Where it ran:

  • Hosted: GCC 13 with -Werror on all three engines, 488 of 488 (my rebuild of the pushed head, 289 of them rational). GCC 15.3 (the gcc:15 image) with -Werror on all three engines and the C ABIs, 507 of 507, after 4a1ee13's fix for the first push's Linux GCC failure (-Warray-bounds on the test helper's resize()). The agent that built it also ran Clang 18 with -Werror, GCC without exceptions or RTTI, and a Debug build of rational's battery (291 of 291, both precondition death tests), all passing.
  • QEMU, both builds:
    • M33: main battery 169/169; the new executable 74 passed and 1 skipped (double's limit-cycle test, since no control bit governs double there); the subnormal image 6/6.
    • M55: 169/169, 75/75 and 6/6.
    • Hexagon: 271 of 271, with ci.yml's exclusions.
    • Four host measurements are left out on target: the spec sweep, the two Kaiser length searches and the 294-design grid.
  • Ratchet and ceilings: no async or bridge input changed. Every rational workload, probe and stack binary is byte-identical (stripped) to the parent's on M33, M55, Hexagon and host in both builds. Every row passes ±3 % and every ceiling passes. No baseline or ceiling file is touched.
  • Style and docs: clang-tidy is clean on the new files, clang-format 18 passes, the vocabulary gate passes, and the book builds with mdBook 0.4.40 and no warnings.
  • Not run locally: MSVC and AppleClang. CI is the first gate for both. One MSVC-specific risk: the named FIR rows are copied in constant evaluation, sized by k_guard_band_fir<…>.taps.size().

Notes for the reviewer

  • Two new questions, open in docs/IIR_PLAN.md v11. Both are pinned as stated limits here.
    • Question 20: the order rule holds behind the nonlinear half-band only. Behind the near-linear and the FIR half-band, the same orders leave the guard band's worst alias at −31.4 / −31.6 dB at super_economy (target −35) and −48.8 / −45.6 dB at transparent (target −60). economy and balanced meet −A/2 behind every half-band. The passband and the band past the stop edge keep their contracts everywhere. The choices:
      • keep 5 / 7 / 7 / 7 and state the gap, which this PR does;
      • use 7 / 7 / 7 / 11 (transparent at 30 multiplies and 102 taps);
      • define settings per stage kind.
    • Question 21: the linear form in Q15 misses the 70 dB tier. Its Q1.14 taps attain −67.1 / −66.8 / −64.6 / −70.9 dB from the stop edge, and its output is −77.8 dB RMS from double. Q31 keeps the designs, and in Q15 the Chebyshev II form holds the tier (guard_band_fixed_test.QuantizedLinearTablesAttainTheirStatedStopbands). The choices:
      • keep it;
      • add Q15 rows to DspTap, designed with margin;
      • don't offer the linear form in Q15.
  • A second test executable. With the new tests inside the main battery, the Hexagon link fails (lld: R_HEX_B22_PCREL out of range, past a direct call's ±8 MiB). The M55 image would also pass its 2 MiB CODE region: the main battery's is already 2,042,664 bytes. So test_guard_band.cpp and test_iir_composition.cpp build as tap_sr_rational_guard_band_tests, and bare_metal_main.cpp gains a mode that runs it on the Arm legs.
  • Decisions the plan left open, taken here:
    • Only the four named settings are tabulated; any other setting, including another committed order, is designed at run time. This keeps an image to four rows.
    • A custom linear setting is designed by DspTap's Kaiser designer at the shortest length that meets it. validate() refuses one no length up to 512 taps meets, with std::runtime_error.
    • The FIR's fixed-point taps quantize the first half with its sum preserved, then mirror it, so the taps stay symmetric bit for bit.
    • The Chebyshev's fixed-point window is IIR-b's near-linear rule: twice the summed per-section decay.
    • The linear form has no flush-to-zero precondition.
    • The new R numbers are R26 (the filter), R27 (composition) and R28 (the limit cycle).
  • tap::dsp::chain reports no window_frames(), so a chain holding a chain (down_by8, say) processes but cannot flush. The flush tests write such chains out flat, and the README says so. Making nested chains flush would be a DspTap change.
  • DspTap follow-up: iir_kernels.h's comment that allpass sections "reach an exactly zero state" under flush-to-zero is wrong for IIR-b's near-linear transparent stage at divisor 1. Its "IIR-c's to decide" on the Chebyshev cycle is now decided. Both are DspTap's to correct.

🤖 Generated with Claude Code

https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf

The guard band filter of docs/IIR_PLAN.md I7, with the maintainer's order
rule (question 14) and the floating limit cycle kept as an honest limit
(question 19):

- guard_band.h: guard_band_filter<S, Ch, P> over guard_band_filter_base<S, P>
  (K12), a 1:1 stage beside the ratios (ratio<L, M>'s charter unchanged).
  P is a guard_phase: nonlinear, the odd-order Chebyshev II over DspTap's
  biquad_cascade, its latency nominal (I5); linear, the even-length
  symmetric (type II) FIR over dot_row, its latency exact, (N - 1) / 2
  frames. guard_band_settings::super_economy() ... transparent() are the
  profiles' numbers at the orders 5 / 7 / 7 / 7: the named Chebyshev II
  designs compile-time (k_guard_band_cheby2), the linear form DspTap's
  committed rows (k_guard_band_fir, copied at compile time so an image
  holds only those four); a custom setting designs at construction
  (design_cheby2_lowpass and cheby2_linf_gains; design_guard_band_linear
  at the length search_guard_band_linear_length finds, validate()
  refusing a setting no length up to 512 taps meets). Every format, the
  FIR's taps quantized by halves and mirrored so they stay symmetric bit
  for bit. The family's call shapes, process / pull / flush out of line
  against a cursor (A12), window_frames() as I6 states it.
- The golden leg: tools/reference/make_guard_band_reference_vectors.py
  writes tests/reference/guard_band_reference_vectors.h, the Chebyshev II
  as scipy's own cheby2 design through sosfilt (checked against DspTap's
  transfer function within 1e-14) and the FIR's taps through lfilter.
- tests/test_guard_band.cpp (typed over float / double / Q15 / Q31): the
  golden leg and the bit pins, the spec per form, the order rule
  recomputed behind each half-band kind, the machine, validate(), latency,
  flush and the limit cycle's bound, fixed point, the aliases a decimating
  chain leaves; tests/support/iir_signals.h, the signals it shares with
  the composition tests; test_iir_subnormals.cpp's no-flush residue for
  the Chebyshev II and the FIR's exact silence.
- tap_sr_rational_guard_band_tests, an executable of its own: with these
  tests in the main battery its Hexagon image passes the +-8 MiB reach of
  a direct call (lld's R_HEX_B22_PCREL out of range) and its M55 image the
  2 MiB CODE region. bare_metal_main.cpp's third mode runs it on the Arm
  legs, leaving out the four host measurements.
- The rational header count is 9.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
…uard band stages (IIR-c, I10)

docs/IIR_PLAN.md I10 as the maintainer decided it (question 16's part): the
recursive stages and both guard band forms satisfy tap::dsp::sync_stage, and
a mixed chain is the caller's tap::dsp::chain, never a named chain or a
coverage-matrix row.

tests/test_iir_composition.cpp, in tap_sr_rational_guard_band_tests: the concepts (the linear form an exact
stage, the Chebyshev II a nominal one, a near-linear stage with the linear
form an exact_delay_stage for the round-trip scaffold); mixed chains (an IIR
up2 and an FIR up3 behind the filter, FIR down3 and IIR down2 before it, the
filter before the FIR and near-linear interpolators and after the FIR
decimator, after iir_down_by<..., 8> and down_by8) bit-identical for any
chunking in every format, and flushing as zero padding, bit for bit but for
the honest limit where a floating stage that holds the zero-input limit
cycle is followed by others; the linear form keeping an all-FIR chain's
exact latency and the nominal composing over a chain with the Chebyshev II,
both against the impulse response; and the offering table pinned cell by
cell. compile_fail/guard_band_exact_latency.cpp: a chain holding the
Chebyshev II has no exact latency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
…urements (IIR-c)

guard_band.EachFormMeetsItsSpec (eight impulse responses through 2049-point
DTFTs in double), guard_band.AnUnmeetableLinearSettingIsRefused and
guard_band.CustomSettingsMeetTheirSpec (DspTap's Kaiser length search, 15 s
and 0.5 s on x86-64) and guard_band.EveryValidDesignFitsTheFixedPointFormats
(294 run-time Chebyshev II designs) run in soft double on Hexagon; the Arm
legs' one-shot filter names the same four (bare_metal_main.cpp). Every other
guard band and composition test runs there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
…he roadmap and the book (IIR-c)

- docs/IIR_PLAN.md v11: the maintainer's decisions for IIR-c (question 14,
  the orders 5 / 7 / 7 / 7; question 16's part, I10 as recommended;
  question 19, the floating limit cycle an honest limit), IIR-c in review
  with its measured numbers (section 5 item 4), and its two findings put to
  the maintainer as questions 20 (the order rule is the nonlinear
  half-band's) and 21 (the linear form in Q15 misses the 70 dB tier).
- rational/PLAN.md: the charter's note that a 1:1 guard band stage is
  admitted beside the ratios (section 1), R26-R28, R24's question 19
  decided, the layout, the v0.22 row and the IIR-c record in section 6.
- rational/CLAUDE.md and the root CLAUDE.md: the charter constraints and
  the engine's description; PLAN.md section 2's "not engines" line.
- README.md: rational's row and the profile section; rational/README.md:
  the guard band filter, its numbers, the offering table (I10) and its
  honest limits, and question 19 decided in the recursive stages' limits.
- docs/ROADMAP.md: IIR-b landed, IIR-c in review.
- book: Part VII's chapter on guard_band.h, and the recursive stages'
  chapter with question 19 decided.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
Hosted GCC 13 and Clang 18 with -Werror, both builds, Debug; clang-tidy,
clang-format, the vocabulary gate and the book; the M33, M55 and Hexagon
batteries in both builds; every rational workload, probe and stack binary
byte-identical to the parent commit's on the M33, M55, Hexagon and host in
both builds, every baseline gate and ceiling passing, none re-recorded.
MSVC and AppleClang not run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
…bound scoped to what was measured (IIR-c)

The settings table in guard_band.h's header had been reflowed past the
column limit into broken rows; it is narrowed to fit. The test names that
the comments cite are kept whole on one line, so a grep finds them. The
limit cycle's bound of 16 times the smallest normal is stated for order 7,
the order it was measured at; a custom order of 9 or more is not measured
here, and DspTap's survey (iir_kernels.h) is cited for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
CI's Linux GCC job (GCC 15) failed on test_guard_band.cpp: the run()
helper's out.resize(), inlined into alias_level(), put resize()'s growing
branch in view, and -Warray-bounds reported a write past the 4096-sample
buffer, a branch that never runs since process() returns outputs_for().
The helper now trims with erase(), which never grows.

GCC 15.3 also failed internally (mark_use) on the order rule's lambda,
which captured references to the half-band designs; the lambda names
them instead. CI's GCC 15 does not reach that failure; 15.3 does, so the
change keeps the next runner image building.

Reproduced in the gcc:15 image (15.3.0): nine array-bounds errors with
the old helper, none with the new one; the tree builds there with -Werror
on all three engines and the C ABIs, 507 of 507 tests passing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
@tap
tap merged commit c592bae into main Nov 22, 2026
41 checks passed
@tap
tap deleted the claude/sample-rate-solutions-comparison-mqc190 branch November 22, 2026 17:27
tap pushed a commit that referenced this pull request Nov 22, 2026
… follow-up)

Question 20 of docs/IIR_PLAN.md, which IIR-c (#114) put to the maintainer,
decided after it landed: "The settings can be different for the fir and near
linear chains than the nonlinear chains."

guard_band.h gains half_band_kind (fir, nonlinear, near_linear) beside
guard_phase, and every named setting takes it with no default. I7's rule
(question 14) is applied behind the half-band the filter serves: 5 / 7 / 7 / 7
behind the nonlinear half-band, 7 / 7 / 7 / 11 behind the FIR and near-linear
ones. economy and balanced are one design behind every kind and take the kind
all the same; guard_band_settings{} stays economy's and the constructor's and
validate()'s default. Six designs per form, the two new ones (70 dB 1/3 at
order 7, 120 dB 5/12 at order 11) already DspTap's committed Chebyshev II and
type II FIR rows, so DspTap does not change; any other setting designs at run
time as before.

Every test over the named settings runs the six designs: the golden vectors
regenerated (12 cases; the generator's sosfilt against direct-form check
loosened to 1e-8, the order-11 polynomials agreeing within 1.7e-9), the four
bit pins re-recorded as the cases they hash grew, the spec, fixed point, limit
cycle and quantized linear stopbands; the order rule pins every kind's pick
against its named setting; the aliases, composition and offering tests build
each chain's filter at its own kind, and the offering table's near-linear rows
with a filter move (down 2 at super_economy 25 and 43 multiplies, at
transparent 49 and 121).

The floating limit cycle at the new orders, over 20 starts per design: 4.4
(float) and 3.0 (double) times the smallest normal at super_economy's order 7,
8.4 and 7.7 at transparent's order 11, inside the bound of 16, which stays.
Without flush-to-zero the residue reaches 11 times the smallest subnormal
(bound 32). The Q15 linear limit is unchanged in kind and stays pinned
(question 21: DspTap's Q15 rows, a later pin bump): -68.9 and -69.2 dB for the
new rows.

The header's settings table gains a half-band column, and README.md,
rational/README.md, rational/CLAUDE.md and the book's guard band chapter state
the settings per kind with the new windows, latencies and multiplies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
tap pushed a commit that referenced this pull request Nov 22, 2026
docs/IIR_PLAN.md v12 records the maintainer's answers to the two questions
IIR-c (#114) put to him, given after it landed, and the follow-up that
implements them:
- question 20, the guard band settings behind the near-linear and the FIR
  half-band, decided per kind: "The settings can be different for the fir and
  near linear chains than the nonlinear chains." 5 / 7 / 7 / 7 behind the
  nonlinear half-band, 7 / 7 / 7 / 11 behind the FIR and near-linear ones,
  through half_band_kind (I6, I7, section 5 item 4, section 8);
- question 21, the linear form in Q15, decided as "DspTap Q15 rows": DspTap
  commits Q15 linear rows designed with margin in a PR of its own; rational
  keeps the Q15 limit pinned as it is until the pin bump that brings them.
v11's record of IIR-c stays as it was; IIR-c is marked landed.

rational/PLAN.md: R26 and R28 state the settings per kind and the limit cycle
at the new orders; v0.23 and section 6's record of IIR-c's follow-up carry its
measurements and verification (488 of 488 hosted with GCC 13, Clang 18 and
without exceptions, 507 of 507 with GCC 15; the M33, M55 and Hexagon legs in
both builds; every rational ratchet binary byte-identical to IIR-c's, no
baseline or ceiling re-recorded). docs/ROADMAP.md marks IIR-c landed and adds
its follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
tap pushed a commit that referenced this pull request Nov 22, 2026
… follow-up)

Question 20 of docs/IIR_PLAN.md, which IIR-c (#114) put to the maintainer,
decided after it landed: "The settings can be different for the fir and near
linear chains than the nonlinear chains."

guard_band.h gains half_band_kind (fir, nonlinear, near_linear) beside
guard_phase, and every named setting takes it with no default. I7's rule
(question 14) is applied behind the half-band the filter serves: 5 / 7 / 7 / 7
behind the nonlinear half-band, 7 / 7 / 7 / 11 behind the FIR and near-linear
ones. economy and balanced are one design behind every kind and take the kind
all the same; guard_band_settings{} stays economy's and the constructor's and
validate()'s default. Six designs per form, the two new ones (70 dB 1/3 at
order 7, 120 dB 5/12 at order 11) already DspTap's committed Chebyshev II and
type II FIR rows, so DspTap does not change; any other setting designs at run
time as before.

Every test over the named settings runs the six designs: the golden vectors
regenerated (12 cases; the generator's sosfilt against direct-form check
loosened to 1e-8, the order-11 polynomials agreeing within 1.7e-9), the four
bit pins re-recorded as the cases they hash grew, the spec, fixed point, limit
cycle and quantized linear stopbands; the order rule pins every kind's pick
against its named setting; the aliases, composition and offering tests build
each chain's filter at its own kind, and the offering table's near-linear rows
with a filter move (down 2 at super_economy 25 and 43 multiplies, at
transparent 49 and 121).

The floating limit cycle at the new orders, over 20 starts per design: 4.4
(float) and 3.0 (double) times the smallest normal at super_economy's order 7,
8.4 and 7.7 at transparent's order 11, inside the bound of 16, which stays.
Without flush-to-zero the residue reaches 11 times the smallest subnormal
(bound 32). The Q15 linear limit is unchanged in kind and stays pinned
(question 21: DspTap's Q15 rows, a later pin bump): -68.9 and -69.2 dB for the
new rows.

The header's settings table gains a half-band column, and README.md,
rational/README.md, rational/CLAUDE.md and the book's guard band chapter state
the settings per kind with the new windows, latencies and multiplies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
tap pushed a commit that referenced this pull request Nov 22, 2026
docs/IIR_PLAN.md v12 records the maintainer's answers to the two questions
IIR-c (#114) put to him, given after it landed, and the follow-up that
implements them:
- question 20, the guard band settings behind the near-linear and the FIR
  half-band, decided per kind: "The settings can be different for the fir and
  near linear chains than the nonlinear chains." 5 / 7 / 7 / 7 behind the
  nonlinear half-band, 7 / 7 / 7 / 11 behind the FIR and near-linear ones,
  through half_band_kind (I6, I7, section 5 item 4, section 8);
- question 21, the linear form in Q15, decided as "DspTap Q15 rows": DspTap
  commits Q15 linear rows designed with margin in a PR of its own; rational
  keeps the Q15 limit pinned as it is until the pin bump that brings them.
v11's record of IIR-c stays as it was; IIR-c is marked landed.

rational/PLAN.md: R26 and R28 state the settings per kind and the limit cycle
at the new orders; v0.23 and section 6's record of IIR-c's follow-up carry its
measurements and verification (488 of 488 hosted with GCC 13, Clang 18 and
without exceptions, 507 of 507 with GCC 15; the M33, M55 and Hexagon legs in
both builds; every rational ratchet binary byte-identical to IIR-c's, no
baseline or ceiling re-recorded). docs/ROADMAP.md marks IIR-c landed and adds
its follow-up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
tap pushed a commit that referenced this pull request Nov 23, 2026
… pair

TAP_SR_VERSION_* 0.9.0 in the three umbrella headers (async.h, ratio.h,
rational.h) and the root project(), token-identical (family.VersionMacrosAgree,
re-pinned in tests/family/version_macros.cpp), and each engine's C ABI version
probe pinned at 0x000900 (CApi.VersionIsBitPacked, with Ratio.VersionIsTheFamilys).
The release of rational's recursive stages and guard band filter (the IIR
plan: IIR-b, IIR-c #114, its follow-up #115, the DspTap 0.4.0 pin #116 and
IIR-d), as the maintainer decided for IIR-d's PR (docs/IIR_PLAN.md v14).

CHANGELOG.md gains the 0.9.0 entry: what breaks (DspTap 0.4.0 is the floor)
and what is new. The root README's tested-pairs row for 0.9.0 (DspTap floor
0.4.0, pinned v0.4.0) is a release's now, and its rational row names the C
ABI's new entry points; the root CLAUDE.md's version lines say 0.9.0, with
the release in its history sentence. No ratchet binary changes with the
version. The maintainer tags v0.9.0 after the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants