Skip to content

Commit

Permalink
Fix tolerances
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion committed May 22, 2022
1 parent 620ef46 commit 4bfeda9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/DualTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,8 @@ for N in (0,3), M in (0,4), V in (Int, Float32)
@test pq isa Tuple{Dual{TestTag()},Dual{TestTag()}}
# We have to adjust tolerances if lower accuracy is requested
# Therefore we don't use `dual_isapprox`
tol = (V === Float32 ? 1f-4 : 1e-6)^(1 / 2^(isempty(ind) ? 0 : first(ind)))
tol = V === Float32 ? 5f-4 : 1e-6
tol = tol^(one(tol) / 2^(isempty(ind) ? 0 : first(ind)))
for i in 1:2
@test value(pq[i]) gamma_inc(a, 1 + PRIMAL, ind...)[i] rtol=tol
@test partials(pq[i]) PARTIALS * Calculus.derivative(x -> gamma_inc(a, x, ind...)[i], 1 + PRIMAL) rtol=tol
Expand Down

0 comments on commit 4bfeda9

Please sign in to comment.