@@ -21,8 +21,7 @@ sys = fractional_to_ordinary(eqs, x, α, 10^-7, 1)
2121prob = ODEProblem (sys, [], tspan)
2222sol = solve (prob, radau5 (), saveat= timepoint, abstol = 1e-10 , reltol = 1e-10 )
2323
24- time = 0
25- while (time <= 1 )
24+ for time in 0 : 0.1 : 1
2625 @test isapprox (expect (time, α), sol (time, idxs= x), atol= 1e-7 )
2726 time += 0.1
2827end
@@ -35,10 +34,8 @@ sys = fractional_to_ordinary(eqs, x, α, 10^-7, 1; matrix=true)
3534prob = ODEProblem (sys, [], tspan)
3635sol = solve (prob, radau5 (), saveat= timepoint, abstol = 1e-10 , reltol = 1e-10 )
3736
38- time = 0
39- while (time <= 1 )
37+ for time in 0 : 0.1 : 1
4038 @test isapprox (expect (time, α), sol (time, idxs= x), atol= 1e-7 )
41- time += 0.1
4239end
4340
4441α = 0.9
@@ -49,10 +46,8 @@ sys = fractional_to_ordinary(eqs, x, α, 10^-7, 1)
4946prob = ODEProblem (sys, [], tspan)
5047sol = solve (prob, radau5 (), saveat= timepoint, abstol = 1e-10 , reltol = 1e-10 )
5148
52- time = 0
53- while (time <= 1 )
49+ for time in 0 : 0.1 : 1
5450 @test isapprox (expect (time, α), sol (time, idxs= x), atol= 1e-7 )
55- time += 0.1
5651end
5752
5853# Testing for example 2 of Section 7
@@ -88,4 +83,4 @@ msys = linear_fractional_to_ordinary([3, 2.5, 2, 1, .5, 0], [1, 1, 1, 4, 1, 4],
8883mprob = ODEProblem (sys, [], tspan)
8984msol = solve (prob, radau5 (), abstol = 1e-5 , reltol = 1e-5 )
9085
91- @test isapprox (expect (5000 ), msol (5000 , idxs= x_0), atol= 1e-5 )
86+ @test isapprox (expect (5000 ), msol (5000 , idxs= x_0), atol= 1e-5 )
0 commit comments