Skip to content

Commit 4bfeda9

Browse files
committed
Fix tolerances
1 parent 620ef46 commit 4bfeda9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/DualTest.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,8 @@ for N in (0,3), M in (0,4), V in (Int, Float32)
556556
@test pq isa Tuple{Dual{TestTag()},Dual{TestTag()}}
557557
# We have to adjust tolerances if lower accuracy is requested
558558
# Therefore we don't use `dual_isapprox`
559-
tol = (V === Float32 ? 1f-4 : 1e-6)^(1 / 2^(isempty(ind) ? 0 : first(ind)))
559+
tol = V === Float32 ? 5f-4 : 1e-6
560+
tol = tol^(one(tol) / 2^(isempty(ind) ? 0 : first(ind)))
560561
for i in 1:2
561562
@test value(pq[i]) gamma_inc(a, 1 + PRIMAL, ind...)[i] rtol=tol
562563
@test partials(pq[i]) PARTIALS * Calculus.derivative(x -> gamma_inc(a, x, ind...)[i], 1 + PRIMAL) rtol=tol

0 commit comments

Comments
 (0)