Skip to content

Commit ffbc84d

Browse files
authored
update test tolerances
1 parent 1be7b9e commit ffbc84d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/gamma_test.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
for (T, max) in ((Float16, 13), (Float32, 43), (Float64, 170))
1+
for (T, max, rtol) in ((Float16, 13, 1.0), (Float32, 43, 1.0), (Float64, 170, 7))
22
v = rand(T, 10000)*max
33
for x in v
4-
@test isapprox(T(SpecialFunctions.gamma(widen(x))), Bessels.gamma(x), rtol=1.5*eps(T))
4+
@test isapprox(T(SpecialFunctions.gamma(widen(x))), Bessels.gamma(x), rtol=rtol*eps(T))
55
if isinteger(x)
66
@test_throws DomainError Bessels.gamma(-x)
77
else
8-
@test isapprox(T(SpecialFunctions.gamma(widen(-x))), Bessels.gamma(-x), atol=nextfloat(T(0.),2), rtol=1.5*eps(T))
8+
@test isapprox(T(SpecialFunctions.gamma(widen(-x))), Bessels.gamma(-x), atol=nextfloat(T(0.),2), rtol=rtol*eps(T))
99
end
1010
end
1111
@test isnan(Bessels.gamma(T(NaN)))

0 commit comments

Comments
 (0)