Skip to content

Commit 425830a

Browse files
committed
test updates
1 parent 1ce9ffc commit 425830a

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

test/root_tests.f90

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,46 +41,46 @@ program root_tests
4141

4242
integer,parameter :: number_of_methods = 20 !! number of methods to test
4343
character(len=100),dimension(number_of_methods),parameter :: methods = [ &
44-
'anderson_bjorck_king', &
45-
'zhang ', &
46-
'barycentric ', &
47-
'regula_falsi ', &
48-
'ridders ', &
49-
'bdqrf ', &
50-
'blendtf ', &
51-
'bisection ', &
52-
'itp ', &
53-
'illinois ', &
54-
'rbp ', &
55-
'modab ', &
56-
'pegasus ', &
57-
'toms748 ', &
58-
'brent ', &
59-
'brentq ', &
60-
'anderson_bjorck ', &
61-
'muller ', &
62-
'brenth ', &
63-
'chandrupatla ' ] !! method names - the order here is roughly the order of worst to best (see the root report output file).
44+
'barycentric ', &
45+
'anderson_bjorck_king', &
46+
'zhang ', &
47+
'bisection ', &
48+
'regula_falsi ', &
49+
'illinois ', &
50+
'ridders ', &
51+
'blendtf ', &
52+
'bdqrf ', &
53+
'rbp ', &
54+
'itp ', &
55+
'modab ', &
56+
'pegasus ', &
57+
'muller ', &
58+
'chandrupatla ', &
59+
'anderson_bjorck ', &
60+
'brent ', &
61+
'toms748 ', &
62+
'brentq ', &
63+
'brenth ' ] !! method names - the order here is roughly the order of worst to best (see the root report output file).
6464

6565
integer,dimension(number_of_methods) :: number_of_wins, ivec, number_of_failures, ivec2
6666

6767
select case (wp)
6868
case(real32)
6969
atol = 1.0e-5_wp
7070
rtol = 1.0e-5_wp
71-
ftol = 1.0e-5_wp
71+
ftol = 0.0_wp
7272
tol_for_check = 1.0e-4_wp
7373
kind_str = 'real32'
7474
case(real64)
7575
atol = 1.0e-15_wp
7676
rtol = 1.0e-13_wp
77-
ftol = 1.0e-15_wp
77+
ftol = 0.0_wp
7878
tol_for_check = 1.0e-7_wp
7979
kind_str = 'real64'
8080
case(real128)
8181
atol = 1.0e-25_wp
8282
rtol = 1.0e-23_wp
83-
ftol = 1.0e-25_wp
83+
ftol = 0.0_wp
8484
tol_for_check = 1.0e-16_wp
8585
kind_str = 'real128'
8686
case default
@@ -513,6 +513,8 @@ subroutine problems(x, ax, bx, fx, xroot, cases, num_of_problems, latex, bounds,
513513
f = -2.0_wp*f
514514
end if
515515
if (present(latex)) latex = '-2 \sum_{i=1}^{20} ((2i - 5)^2)/(x - i^2)^3'
516+
517+
!.... 13 & 14 don't actually converge to the right root with real64 since the func value is lower than the tol on the bound....
516518
case (12)
517519
a = -9.0_wp
518520
b = 31.0_wp
@@ -534,6 +536,7 @@ subroutine problems(x, ax, bx, fx, xroot, cases, num_of_problems, latex, bounds,
534536
if (present(x)) f = -200.0_wp*x*exp(-3.0_wp*x)
535537
if (present(latex)) latex = '-200 x \mathrm{e}^{-3 x}'
536538
if (present(bounds)) bounds = '-9,31'
539+
537540
case (15)
538541
a = 0.0_wp
539542
b = 5.0_wp
@@ -1746,7 +1749,7 @@ subroutine problems(x, ax, bx, fx, xroot, cases, num_of_problems, latex, bounds,
17461749
error stop 'invalid case'
17471750
end select
17481751

1749-
if (present(num_of_problems)) num_of_problems = 144
1752+
if (present(num_of_problems)) num_of_problems = 145
17501753

17511754
! outputs:
17521755
if (present(ax)) ax = a

0 commit comments

Comments
 (0)