12 integer(IK) :: niter, minniter
= 1000
13 real(RKG) :: xlow, xmin, xupp, flow, fmin, fupp
14 type(display_type) :: disp
18 call disp%show(
"getSqNeg(x) = (x - 1)**2")
19 call disp%show(
"xlow = -3; xupp = -1; niter = minniter")
20 xlow
= -3; xupp
= -1; niter
= minniter
21 call disp%show(
"call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin)")
23 call disp%show(
"if (niter > minniter) error stop 'Bracketing failed.'")
24 if (niter
> minniter)
error stop 'Bracketing failed.'
25 call disp%show(
"[xlow, xmin, xupp, getSqNeg(xlow), fmin, getSqNeg(xupp)]")
26 call disp%show( [xlow, xmin, xupp, getSqNeg(xlow), fmin, getSqNeg(xupp)] )
29 call disp%show(
"call setAsserted(isBracketMin(xmin, xlow, xupp, fmin, getSqNeg(xlow), getSqNeg(xupp)))")
34 call disp%show(
"getSqNeg(x) = (x - 1)**2")
35 call disp%show(
"xlow = -3; xupp = -1; niter = minniter")
36 xlow
= -3; xupp
= -1; niter
= minniter
37 call disp%show(
"call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin, flow, fupp)")
38 call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin, flow, fupp)
39 call disp%show(
"if (niter > minniter) error stop 'Bracketing failed.'")
40 if (niter
> minniter)
error stop 'Bracketing failed.'
41 call disp%show(
"[xlow, xmin, xupp, flow, fmin, fupp]")
42 call disp%show( [xlow, xmin, xupp, flow, fmin, fupp] )
45 call disp%show(
"call setAsserted(isBracketMin(xmin, xlow, xupp, flow, fmin, fupp))")
50 call disp%show(
"getSqNeg(x) = (x - 1)**2")
51 call disp%show(
"xlow = 3; xupp = 9; niter = minniter")
52 xlow
= 3; xupp
= 9; niter
= minniter
53 call disp%show(
"call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin, flow, fupp)")
54 call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin, flow, fupp)
55 call disp%show(
"if (niter > minniter) error stop 'Bracketing failed.'")
56 if (niter
> minniter)
error stop 'Bracketing failed.'
57 call disp%show(
"[xlow, xmin, xupp, flow, fmin, fupp]")
58 call disp%show( [xlow, xmin, xupp, flow, fmin, fupp] )
61 call disp%show(
"call setAsserted(isBracketMin(xmin, xlow, xupp, fmin, flow, fupp))")
66 call disp%show(
"getSqNeg(x) = (x - 1)**2")
67 call disp%show(
"xlow = -5; xupp = 4; niter = minniter")
68 xlow
= -5; xupp
= 4; niter
= minniter
69 call disp%show(
"call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin, flow, fupp)")
70 call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin, flow, fupp)
71 call disp%show(
"if (niter > minniter) error stop 'Bracketing failed.'")
72 if (niter
> minniter)
error stop 'Bracketing failed.'
73 call disp%show(
"[xlow, xmin, xupp, flow, fmin, fupp]")
74 call disp%show( [xlow, xmin, xupp, flow, fmin, fupp] )
77 call disp%show(
"call setAsserted(isBracketMin(xmin, xlow, xupp, fmin, flow, fupp))")
83 function getSqNeg(x)
result(func)
84 real(RKG),
intent(in) :: x
Verify the input assertion holds and if it does not, print the (optional) input message on stdout and...
Generate and return an object of type stop_type with the user-specified input attributes.
This is a generic method of the derived type display_type with pass attribute.
Refine an initial input interval such that the final returned interval is guaranteed to contain the m...
Generate and return the conversion of the input value to an output Fortran string,...
This module contains classes and procedures for reporting and handling errors.
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.
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...
This module contains the generic procedures for converting values of different types and kinds to For...
Generate and return an object of type display_type.
2getSqNeg(x)
= (x
- 1)
**2
3xlow
= -3; xupp
= -1; niter
= minniter
5if (niter
> minniter)
error stop 'Bracketing failed.'
6[xlow, xmin, xupp, getSqNeg(xlow), fmin, getSqNeg(xupp)]
7-1.00000000000000000000000000000000000,
+1.00000000000000000000000000000000000,
+2.23606797749978969640917366873127632,
+4.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000,
+1.52786404500042060718165266253744775
13getSqNeg(x)
= (x
- 1)
**2
14xlow
= -3; xupp
= -1; niter
= minniter
15call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin, flow, fupp)
16if (niter
> minniter)
error stop 'Bracketing failed.'
17[xlow, xmin, xupp, flow, fmin, fupp]
18-1.00000000000000000000000000000000000,
+1.00000000000000000000000000000000000,
+2.23606797749978969640917366873127632,
+4.00000000000000000000000000000000000,
+0.00000000000000000000000000000000000,
+1.52786404500042060718165266253744775
24getSqNeg(x)
= (x
- 1)
**2
25xlow
= 3; xupp
= 9; niter
= minniter
26call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin, flow, fupp)
27if (niter
> minniter)
error stop 'Bracketing failed.'
28[xlow, xmin, xupp, flow, fmin, fupp]
29-6.70820393249936908922752100619382819,
+3.00000000000000000000000000000000000,
+9.00000000000000000000000000000000000,
+64.0000000000000000000000000000000000,
+4.00000000000000000000000000000000000,
+59.4164078649987381784550420123876502
35getSqNeg(x)
= (x
- 1)
**2
36xlow
= -5; xupp
= 4; niter
= minniter
37call setBracketMin(getSqNeg, niter, xmin, xlow, xupp, fmin, flow, fupp)
38if (niter
> minniter)
error stop 'Bracketing failed.'
39[xlow, xmin, xupp, flow, fmin, fupp]
40-5.00000000000000000000000000000000000,
+4.00000000000000000000000000000000000,
+18.5623058987490536338412815092907438,
+36.0000000000000000000000000000000000,
+9.00000000000000000000000000000000000,
+308.434588481235804507619222639361176