Skip to content

Commit 66d3b7a

Browse files
check WORD_SIZE for equality of with fft
1 parent ba27be7 commit 66d3b7a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

test/nuffttests.jl

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,16 @@ using FastTransforms, Base.Test
7474
ω = collect(0.0:n-1)
7575
x = ω/n
7676
fftc = fft(c)
77-
@test norm(nufft1(c, ω, ϵ) - fftc) == 0
78-
@test norm(nufft2(c, x, ϵ) - fftc) == 0
79-
@test norm(nufft3(c, x, ω, ϵ) - fftc) == 0
77+
if Base.Sys.WORD_SIZE == 64
78+
@test norm(nufft1(c, ω, ϵ) - fftc) == 0
79+
@test norm(nufft2(c, x, ϵ) - fftc) == 0
80+
@test norm(nufft3(c, x, ω, ϵ) - fftc) == 0
81+
else
82+
err_bnd = 500*eps(Float64)*norm(c)
83+
@test norm(nufft1(c, ω, ϵ) - fftc) < err_bnd
84+
@test norm(nufft2(c, x, ϵ) - fftc) < err_bnd
85+
@test norm(nufft3(c, x, ω, ϵ) - fftc) < err_bnd
86+
end
8087
end
8188

8289
function nudft1{T<:AbstractFloat}(C::Matrix{Complex{T}}, ω1::AbstractVector{T}, ω2::AbstractVector{T})

0 commit comments

Comments
 (0)