Skip to content

Commit 92344ec

Browse files
test: make homotopy continuation test more robust
1 parent fe19d26 commit 92344ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/extensions/homotopy_continuation.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,15 +151,15 @@ end
151151
@variables x=0.25 y=0.125
152152
a = sin(x^2 - 4x + 1)
153153
b = cos(3log(y) + 4)
154-
@mtkbuild sys = NonlinearSystem([(a^2 - 4a * b + 4b^2) / (a - 0.25) ~ 0
154+
@mtkbuild sys = NonlinearSystem([(a^2 - 5a * b + 6b^2) / (a - 0.25) ~ 0
155155
(a^2 - 0.75a + 0.125) ~ 0])
156156
prob = HomotopyContinuationProblem(sys, [])
157157
@test prob[x] 0.25
158158
@test prob[y] 0.125
159159
sol = solve(prob, allrootsalg).u[1]
160160
@test SciMLBase.successful_retcode(sol)
161161
@test sol[a]0.5 atol=1e-6
162-
@test sol[b]0.25 atol=1e-6
162+
@test isapprox(sol[b], 0.25; atol = 1e-6) || isapprox(sol[b], 0.5 / 3; atol = 1e-6)
163163
end
164164

165165
@testset "Rational functions" begin

0 commit comments

Comments
 (0)