@@ -4,7 +4,7 @@ import FastTransforms: th_leg2cheb, th_cheb2leg, th_ultra2ultra,th_jac2jac, th_l
44 plan_th_cheb2leg!, plan_th_leg2cheb!
55
66@testset " ToeplitzHankel" begin
7- for x in ([1.0 ], [1.0 ,2 ,3 ,4 ,5 ], [1.0 + im,2 - 3im ,3 + 4im ,4 - 5im ,5 + 10im ])
7+ for x in ([1.0 ], [1.0 ,2 ,3 ,4 ,5 ], [1.0 + im,2 - 3im ,3 + 4im ,4 - 5im ,5 + 10im ], collect ( 1.0 : 1000 ) )
88 @test th_leg2cheb (x) ≈ lib_leg2cheb (x)
99 @test th_cheb2leg (x) ≈ lib_cheb2leg (x)
1010 @test th_leg2chebu (x) ≈ lib_ultra2ultra (x, 0.5 , 1.0 )
@@ -14,6 +14,9 @@ import FastTransforms: th_leg2cheb, th_cheb2leg, th_ultra2ultra,th_jac2jac, th_l
1414
1515 @test all (th_leg2cheb (x) .=== leg2cheb (x))
1616 @test all (th_cheb2leg (x) .=== cheb2leg (x))
17+
18+ @test th_cheb2leg (th_leg2cheb (x)) ≈ x atol= 1E-9
19+ @test th_leg2leg (th_cheb2cheb (x)) ≈ x atol= 1E-11
1720 end
1821
1922 for X in (randn (5 ,4 ), randn (5 ,4 ) + im* randn (5 ,4 ))
@@ -37,4 +40,13 @@ import FastTransforms: th_leg2cheb, th_cheb2leg, th_ultra2ultra,th_jac2jac, th_l
3740 @test leg2cheb (x) ≈ lib_leg2cheb (x)
3841 @test cheb2leg (x) ≈ lib_cheb2leg (x)
3942 end
43+
44+ @testset " jishnub example" begin
45+ x = chebyshevpoints (4096 );
46+ f = x -> cospi (1000 x);
47+ y = f .(x);
48+ v = cheb2leg (chebyshevtransform (y))
49+ @test norm (v - cheb2leg (leg2cheb (v)), Inf ) ≤ 1E-13
50+ @test norm (v - cheb2leg (leg2cheb (v)))/ norm (v) ≤ 1E-14
51+ end
4052end
0 commit comments