Skip to content

Commit 2ecb137

Browse files
committed
Increase tolerance for mixed precision tests in resolve.jl
Mixed precision algorithms need higher tolerance due to reduced precision arithmetic. Increased from atol=1e-5, rtol=1e-5 to atol=1e-4, rtol=1e-4.
1 parent 6a7e6ab commit 2ecb137

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/resolve.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ for alg in vcat(InteractiveUtils.subtypes(AbstractDenseFactorization),
6262
# Use higher tolerance for mixed precision algorithms
6363
expected = [-2.0, 1.5]
6464
if Symbol(alg) in MIXED_PRECISION_ALGS
65-
@test solve!(linsolve).u expected atol=1e-5 rtol=1e-5
65+
@test solve!(linsolve).u expected atol=1e-4 rtol=1e-4
6666
@test !linsolve.isfresh
67-
@test solve!(linsolve).u expected atol=1e-5 rtol=1e-5
67+
@test solve!(linsolve).u expected atol=1e-4 rtol=1e-4
6868
else
6969
@test solve!(linsolve).u expected
7070
@test !linsolve.isfresh
@@ -83,7 +83,7 @@ for alg in vcat(InteractiveUtils.subtypes(AbstractDenseFactorization),
8383

8484
# Use higher tolerance for mixed precision algorithms
8585
if Symbol(alg) in MIXED_PRECISION_ALGS
86-
@test solve!(linsolve).u expected atol=1e-5 rtol=1e-5
86+
@test solve!(linsolve).u expected atol=1e-4 rtol=1e-4
8787
else
8888
@test solve!(linsolve).u expected
8989
end

0 commit comments

Comments
 (0)