Port + Fuzz Lab
Port a trusted dynamics routine to C, feed both the same random inputs, and chase every mismatch.
Found in a recurrence-formula integrator (PyLnD) by 2,000 random cases. On normal inputs the C port matched to 2e-13; near-zero time steps blew rounding up to 4e-3.
Fast sample rates
Above 100 kHz the coefficients are never computed. Python crashes; the C port returns all zeros.
Jittery time steps
A step change under 10 µs keeps stale coefficients: up to 25–200% error. A relative check fixes it (1e-14).
Very fine steps
The closed-form coefficients cancel when ω·dt is tiny: 4e-5 error at 63,000 points per cycle.
More
Also: damping ζ ≥ 1 and rigid-body modes (ω = 0) crash; a repeated time stamp gives inf/NaN. The exact reference is a matrix-exponential step with the load linear between points. A second test on a Smallwood SRS found Q = 0.5 returns NaN (Python) or −inf (C), sampled peaks run 2% low at 10 points per cycle, and the first version skipped residual response (fixed).