Skip to content

Commit ae39654

Browse files
baggepinnenclaude
andcommitted
Use a relative tolerance in the basis-function frequency-response test
For the Kautz basis with poles up to 1e3 rad/s, the absolute difference between the two frequency-response computations exceeded 1e-10 for about 70% of the random coefficient vectors with ControlSystemsBase 1.22, while the relative difference was at most 2e-13. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 932da0c commit ae39654

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/test_basis_functions.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ for basis in [kautz(av), laguerre(1,n), laguerre_oo(1,n), adhocbasis(av)]
99
F = sum_basis(basis, p)
1010
fr1 = freqresp(F, w) |> vec
1111
fr2 = freqresp(tf(1), basis, w, p) |> vec
12-
@test norm(fr1-fr2) < 1e-10
12+
@test norm(fr1-fr2) < 1e-10*norm(fr1)
1313
@test basislength(basis) == n
1414
end
1515
basis = laguerre_oo(1,n)

0 commit comments

Comments
 (0)