File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -151,22 +151,22 @@ end
151151 @variables x= 0.25 y= 0.125
152152 a = sin (x^ 2 - 4 x + 1 )
153153 b = cos (3 log (y) + 4 )
154- @mtkbuild sys = NonlinearSystem ([(a^ 2 - 4 a * b + 4 b ^ 2 ) / (a - 0.25 ) ~ 0
154+ @mtkbuild sys = NonlinearSystem ([(a^ 2 - 5 a * b + 6 b ^ 2 ) / (a - 0.25 ) ~ 0
155155 (a^ 2 - 0.75 a + 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 )
163163end
164164
165165@testset " Rational functions" begin
166166 @variables x= 2.0 y= 2.0
167- @parameters n = 4
167+ @parameters n = 5
168168 @mtkbuild sys = NonlinearSystem ([
169- 0 ~ (x^ 2 - n * x + n ) * (x - 1 ) / (x - 2 ) / (x - 3 )
169+ 0 ~ (x^ 2 - n * x + 6 ) * (x - 1 ) / (x - 2 ) / (x - 3 )
170170 ])
171171 prob = HomotopyContinuationProblem (sys, [])
172172 sol = solve_allroots_closest (prob)
184184 0 ~ ((y - 3 ) / (y - 4 )) * (n / (y - 5 )) + ((x - 1.5 ) / (x - 5.5 ))^ 2
185185 ],
186186 [x, y],
187- [n])
187+ [n]; defaults = [n => 4 ] )
188188 sys = complete (sys)
189189 prob = HomotopyContinuationProblem (sys, [])
190190 sol = solve (prob, singlerootalg)
You can’t perform that action at this time.
0 commit comments