Skip to content

Commit

Permalink
use approximate comparison in test
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdjscott committed Jun 27, 2024
1 parent c3abcab commit 45d9410
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/special_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ using SpecialFunctions
DACE.init(1,3)

x = DACE.random(-1)
@test DACE.cons(erf(x)) == erf(DACE.cons(x))
@test isapprox(DACE.cons(erf(x)), erf(DACE.cons(x)), atol=1e-8, rtol=1e-5)

end

@testset "Test erfc" begin
DACE.init(1,3)

x = DACE.random(-1)
@test DACE.cons(erfc(x)) == erfc(DACE.cons(x))
@test isapprox(DACE.cons(erfc(x)), erfc(DACE.cons(x)), atol=1e-8, rtol=1e-5)

end

end
end

0 comments on commit 45d9410

Please sign in to comment.