Skip to content

Commit 84a0b91

Browse files
committed
Better barycentric test
1 parent 8f0931e commit 84a0b91

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

test/ifelsemasks.jl

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ T = Float32
361361
end
362362
end
363363

364+
chebpts(m) = (n=m-1; [cos(k*pi/n) for k in 0:n])
364365
function barycentric_weight0(X)
365366
T = eltype(X)
366367
n = length(X) - 1
@@ -596,10 +597,13 @@ T = Float32
596597
testfunctionavx!(f, v, d, g, s, θ)
597598
@test f fc
598599

599-
X = rand(4, 5)
600-
bX = barycentric_weight0(X);
601-
@test barycentric_weight1(X) bX
602-
@test barycentric_weight2(X) bX
603-
@test barycentric_weight3(X) bX
604-
@test barycentric_weight4(X) bX
600+
for i 1:50
601+
X = chebpts(i)
602+
bX = barycentric_weight0(X);
603+
@test barycentric_weight1(X) bX
604+
@test barycentric_weight2(X) bX
605+
@test barycentric_weight3(X) bX
606+
@test barycentric_weight4(X) bX
607+
end
605608
end
609+

0 commit comments

Comments
 (0)