5 use pm_mathRoot,
only:
setRoot,
false,
bisection,
secant,
brent,
ridders,
toms748,
newton,
halley,
schroder
15 type(display_type) :: disp
19 call disp%show(
"lb = 2._RKG; lf = getSin(lb)")
20 lb
= 2._RKG; lf
= getSin(lb)
21 call disp%show(
"ub = 4._RKG; uf = getSin(ub)")
22 ub
= 4._RKG; uf
= getSin(ub)
25 call disp%show(
"call setRoot(false, getSin, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
26 call setRoot(
false, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
27 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
28 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
29 call disp%show(
"[root, getSin(root)]")
30 call disp%show( [root, getSin(root)] )
34 call disp%show(
"call setRoot(bisection, getSin, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
35 call setRoot(
bisection, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
36 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
37 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
38 call disp%show(
"[root, getSin(root)]")
39 call disp%show( [root, getSin(root)] )
43 call disp%show(
"call setRoot(secant, getSin, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
44 call setRoot(
secant, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
45 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
46 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
47 call disp%show(
"[root, getSin(root)]")
48 call disp%show( [root, getSin(root)] )
52 call disp%show(
"call setRoot(brent, getSin, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
53 call setRoot(
brent, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
54 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
55 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
56 call disp%show(
"[root, getSin(root)]")
57 call disp%show( [root, getSin(root)] )
61 call disp%show(
"call setRoot(ridders, getSin, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
62 call setRoot(
ridders, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
63 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
64 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
65 call disp%show(
"[root, getSin(root)]")
66 call disp%show( [root, getSin(root)] )
70 call disp%show(
"call setRoot(toms748, getSin, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
71 call setRoot(
toms748, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
72 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
73 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
74 call disp%show(
"[root, getSin(root)]")
75 call disp%show( [root, getSin(root)] )
79 call disp%show(
"call setRoot(newton, getSinDiff, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
80 call setRoot(
newton, getSinDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
81 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
82 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
83 call disp%show(
"[root, getSin(root)]")
84 call disp%show( [root, getSin(root)] )
88 call disp%show(
"call setRoot(halley, getSinDiff, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
89 call setRoot(
halley, getSinDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
90 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
91 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
92 call disp%show(
"[root, getSin(root)]")
93 call disp%show( [root, getSin(root)] )
97 call disp%show(
"call setRoot(schroder, getSinDiff, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
98 call setRoot(
schroder, getSinDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
99 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
100 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
101 call disp%show(
"[root, getSin(root)]")
102 call disp%show( [root, getSin(root)] )
110 call disp%show(
"lb = 1._RKG; lf = getCos(lb)")
111 lb
= 1._RKG; lf
= getCos(lb)
112 call disp%show(
"ub = 3._RKG; uf = getCos(ub)")
113 ub
= 3._RKG; uf
= getCos(ub)
116 call disp%show(
"call setRoot(false, getCos, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
117 call setRoot(
false, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
118 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
119 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
120 call disp%show(
"[root, getCos(root)]")
121 call disp%show( [root, getCos(root)] )
125 call disp%show(
"call setRoot(bisection, getCos, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
126 call setRoot(
bisection, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
127 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
128 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
129 call disp%show(
"[root, getCos(root)]")
130 call disp%show( [root, getCos(root)] )
134 call disp%show(
"call setRoot(secant, getCos, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
135 call setRoot(
secant, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
136 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
137 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
138 call disp%show(
"[root, getCos(root)]")
139 call disp%show( [root, getCos(root)] )
143 call disp%show(
"call setRoot(brent, getCos, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
144 call setRoot(
brent, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
145 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
146 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
147 call disp%show(
"[root, getCos(root)]")
148 call disp%show( [root, getCos(root)] )
152 call disp%show(
"call setRoot(ridders, getCos, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
153 call setRoot(
ridders, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
154 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
155 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
156 call disp%show(
"[root, getCos(root)]")
157 call disp%show( [root, getCos(root)] )
161 call disp%show(
"call setRoot(toms748, getCos, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
162 call setRoot(
toms748, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
163 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
164 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
165 call disp%show(
"[root, getCos(root)]")
166 call disp%show( [root, getCos(root)] )
170 call disp%show(
"call setRoot(newton, getCosDiff, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
171 call setRoot(
newton, getCosDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
172 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
173 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
174 call disp%show(
"[root, getCos(root)]")
175 call disp%show( [root, getCos(root)] )
179 call disp%show(
"call setRoot(halley, getCosDiff, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
180 call setRoot(
halley, getCosDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
181 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
182 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
183 call disp%show(
"[root, getCos(root)]")
184 call disp%show( [root, getCos(root)] )
188 call disp%show(
"call setRoot(schroder, getCosDiff, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
189 call setRoot(
schroder, getCosDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
190 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
191 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
192 call disp%show(
"[root, getCos(root)]")
193 call disp%show( [root, getCos(root)] )
201 call disp%show(
"lb = -1._RKG; lf = getQuad(lb)")
202 lb
= -1._RKG; lf
= getQuad(lb)
203 call disp%show(
"ub = +4._RKG; uf = getQuad(ub)")
204 ub
= +4._RKG; uf
= getQuad(ub)
207 call disp%show(
"call setRoot(false, getQuad, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
208 call setRoot(
false, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
209 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
210 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
211 call disp%show(
"[root, getQuad(root)]")
212 call disp%show( [root, getQuad(root)] )
216 call disp%show(
"call setRoot(bisection, getQuad, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
217 call setRoot(
bisection, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
218 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
219 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
220 call disp%show(
"[root, getQuad(root)]")
221 call disp%show( [root, getQuad(root)] )
225 call disp%show(
"call setRoot(secant, getQuad, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
226 call setRoot(
secant, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
227 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
228 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
229 call disp%show(
"[root, getQuad(root)]")
230 call disp%show( [root, getQuad(root)] )
234 call disp%show(
"call setRoot(brent, getQuad, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
235 call setRoot(
brent, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
236 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
237 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
238 call disp%show(
"[root, getQuad(root)]")
239 call disp%show( [root, getQuad(root)] )
243 call disp%show(
"call setRoot(ridders, getQuad, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
244 call setRoot(
ridders, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
245 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
246 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
247 call disp%show(
"[root, getQuad(root)]")
248 call disp%show( [root, getQuad(root)] )
252 call disp%show(
"call setRoot(toms748, getQuad, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
253 call setRoot(
toms748, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
254 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
255 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
256 call disp%show(
"[root, getQuad(root)]")
257 call disp%show( [root, getQuad(root)] )
261 call disp%show(
"call setRoot(newton, getQuadDiff, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
262 call setRoot(
newton, getQuadDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
263 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
264 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
265 call disp%show(
"[root, getQuad(root)]")
266 call disp%show( [root, getQuad(root)] )
270 call disp%show(
"call setRoot(halley, getQuadDiff, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
271 call setRoot(
halley, getQuadDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
272 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
273 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
274 call disp%show(
"[root, getQuad(root)]")
275 call disp%show( [root, getQuad(root)] )
279 call disp%show(
"call setRoot(schroder, getQuadDiff, root, lb, ub, lf, uf, abstol = epsilon(0._RKG)**.7, neval = neval)")
280 call setRoot(
schroder, getQuadDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
281 call disp%show(
"if (neval < 0_IK) error stop 'The root-finding algorithm failed to converge.'")
282 if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
283 call disp%show(
"[root, getQuad(root)]")
284 call disp%show( [root, getQuad(root)] )
291 pure function getSin(x)
result(func)
292 real(RKG),
intent(in) :: x
297 pure function getSinDiff(x, order)
result(func)
298 integer(IK),
intent(in) :: order
299 real(RKG),
intent(in) :: x
301 if (order
== 0) func
= +getSin(x)
302 if (order
== 1) func
= +cos(x)
303 if (order
== 2) func
= -sin(x)
306 pure function getCos(x)
result(func)
307 real(RKG),
intent(in) :: x
312 pure function getCosDiff(x, order)
result(func)
313 integer(IK),
intent(in) :: order
314 real(RKG),
intent(in) :: x
316 if (order
== 0) func
= +getCos(x)
317 if (order
== 1) func
= -sin(x)
318 if (order
== 2) func
= -cos(x)
321 pure function getQuad(x)
result(func)
322 real(RKG),
intent(in) :: x
324 func
= x
* (x
- 1._RKG)
* (x
- 2._RKG)
327 pure function getQuadDiff(x, order)
result(func)
328 integer(IK),
intent(in) :: order
329 real(RKG),
intent(in) :: x
331 if (order
== 0) func
= getQuad(x)
332 if (order
== 1) func
= 3._RKG * x
**2 - 6._RKG * x
+ 2._RKG
333 if (order
== 2) func
= 6._RKG * x
- 6._RKG
This is a generic method of the derived type display_type with pass attribute.
This is a generic method of the derived type display_type with pass attribute.
This module contains classes and procedures for input/output (IO) or generic display operations on st...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
integer, parameter RKH
The scalar integer constant of intrinsic default kind, representing the highest-precision real kind t...
type(brent_type), parameter brent
This is a scalar parameter object of type brent_type that is exclusively used to signify the use of B...
type(ridders_type), parameter ridders
This is a scalar parameter object of type ridders_type that is exclusively used to signify the use of...
type(toms748_type), parameter toms748
This is a scalar parameter object of type toms748_type that is exclusively used to signify the use of...
type(newton_type), parameter newton
This is a scalar parameter object of type newton_type that is exclusively used to signify the use of ...
type(bisection_type), parameter bisection
This is a scalar parameter object of type bisection_type that is exclusively used to signify the use ...
type(false_type), parameter false
This is a scalar parameter object of type false_type that is exclusively used to signify the use of F...
type(halley_type), parameter halley
This is a scalar parameter object of type halley_type that is exclusively used to signify the use of ...
type(schroder_type), parameter schroder
This is a scalar parameter object of type schroder_type that is exclusively used to signify the use o...
type(secant_type), parameter secant
This is a scalar parameter object of type secant_type that is exclusively used to signify the use of ...
Generate and return an object of type display_type.
2lb
= 2._RKG; lf
= getSin(lb)
3ub
= 4._RKG; uf
= getSin(ub)
5+0.909297426825681695396019865911744868,
-0.756802495307928251372639094511829109
6call setRoot(
false, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
7if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
9+3.14159265358979323846264338327950280,
+0.867181013012378102479704402604335225E-34
13call setRoot(
bisection, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
14if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
16+3.14159265358979323846264376397729529,
-0.380697792403865321819264032602920990E-24
20call setRoot(
secant, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
21if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
23+3.14159265358979323846264338327950280,
+0.867181013012378102479704402604335225E-34
27call setRoot(
brent, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
28if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
30+3.14159265358979323846264338327950280,
+0.867181013012378102479704402604335225E-34
34call setRoot(
ridders, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
35if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
37+3.14159265358979323846264338327950280,
+0.867181013012378102479704402604335225E-34
41call setRoot(
toms748, getSin, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
42if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
44+3.14159265358979323846264338327950280,
+0.867181013012378102479704402604335225E-34
48call setRoot(
newton, getSinDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
49if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
51+3.14159265358979323846264338327950280,
+0.867181013012378102479704402604335225E-34
55call setRoot(
halley, getSinDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
56if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
58+3.14159265358979323846264338327950280,
+0.867181013012378102479704402604335225E-34
62call setRoot(
schroder, getSinDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
63if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
65+3.14159265358979323846264338327950280,
+0.867181013012378102479704402604335225E-34
70lb
= 1._RKG; lf
= getCos(lb)
71ub
= 3._RKG; uf
= getCos(ub)
73+0.540302305868139717400936607442976558,
-0.989992496600445457271572794731261336
74call setRoot(
false, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
75if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
77+1.57079632679489661923132169163975140,
+0.433590506506189051239852201302167613E-34
81call setRoot(
bisection, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
82if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
84+1.57079632679489661923132270916926020,
-0.101752950875496033578104070837142335E-23
88call setRoot(
secant, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
89if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
91+1.57079632679489661923132169163975140,
+0.433590506506189051239852201302167613E-34
95call setRoot(
brent, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
96if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
98+1.57079632679489661923132169163975140,
+0.433590506506189051239852201302167613E-34
102call setRoot(
ridders, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
103if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
105+1.57079632679489661923132169164015931,
-0.407868603170565934772132143019357364E-30
109call setRoot(
toms748, getCos, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
110if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
112+1.57079632679489661923132169163975140,
+0.433590506506189051239852201302167613E-34
116call setRoot(
newton, getCosDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
117if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
119+1.57079632679489661923132169163975140,
+0.433590506506189051239852201302167613E-34
123call setRoot(
halley, getCosDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
124if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
126+1.57079632679489661923132169163975140,
+0.433590506506189051239852201302167613E-34
130call setRoot(
schroder, getCosDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
131if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
133+1.57079632679489661923132169163975140,
+0.433590506506189051239852201302167613E-34
138lb
= -1._RKG; lf
= getQuad(lb)
139ub
= +4._RKG; uf
= getQuad(ub)
141-6.00000000000000000000000000000000000,
+24.0000000000000000000000000000000000
142call setRoot(
false, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
143if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
145+0.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000
149call setRoot(
bisection, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
150if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
152+1.99999999999999999999999958640969372,
-0.827180612553027674871408178899138516E-24
156call setRoot(
secant, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
157if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
159+0.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000
163call setRoot(
brent, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
164if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
166+0.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000
170call setRoot(
ridders, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
171if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
173+2.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000
177call setRoot(
toms748, getQuad, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
178if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
180+2.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000
184call setRoot(
newton, getQuadDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
185if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
187+2.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000
191call setRoot(
halley, getQuadDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
192if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
194+2.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000
198call setRoot(
schroder, getQuadDiff, root, lb, ub, lf, uf, abstol
= epsilon(
0._RKG)
**.
7, neval
= neval)
199if (neval
< 0_IK)
error stop 'The root-finding algorithm failed to converge.'
201+2.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000