ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_quadPack::getQuadGK Interface Reference

Compute the 1D integral of the input scalar integrand getFunc on the finite or infinite interval [a, b] and estimate its absolute error via the requested non-adaptive Gauss-Kronrod (GK) extension rule. More...

Detailed Description

Compute the 1D integral of the input scalar integrand getFunc on the finite or infinite interval [a, b] and estimate its absolute error via the requested non-adaptive Gauss-Kronrod (GK) extension rule.

Parameters
getFunc: The input function to be integrated (i.e., the integrand).
  1. On entry, it must take an input scalar of the same type and kind as abserr.
  2. On exit, it must generate an input scalar of the same type and kind as abserr, representing the corresponding function value.
    The following illustrates the general interface of getFunc:
    function getFunc(x) result(func)
    use pm_kind, only: RK => RKG
    real(RK) , intent(in) :: x
    real(RK) :: func
    end function
    This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
    Definition: pm_kind.F90:268
    integer, parameter RK
    The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
    Definition: pm_kind.F90:543
    where RKG refers to any desired real kind supported by the processor that is desired for the output abserr.
[in]lb: The input scalar argument that can be either,
  1. a value of type real of the same kind as the kind for the output abserr, representing the lower limit of integration, or
  2. the constant ninf, representing negative infinity ( \(-\infty\)) as the lower limit of integration.
[in]ub: The input scalar argument that can be either,
  1. a value of type real of the same kind as the kind for the output abserr, representing the upper limit of integration, or
  2. the constant pinf, representing positive infinity ( \(+\infty\)) as the upper limit of integration.
[out]qrule: The input scalar constant argument that can be either,
  1. GK15 of type GK15_type, or
  2. GK21 of type GK21_type, or
  3. GK31 of type GK31_type, or
  4. GK41 of type GK41_type, or
  5. GK51 of type GK51_type, or
  6. GK61 of type GK61_type.
The specified objects are empty and merely serve to differentiate the multitude of orders of Gauss-Kronrod quadrature rules.
For example, specifying GK15 dictates the use of 15-points Gauss-Kronrod quadrature rules for computing the integral and estimating its error.
(optional. It can be present if and only if nodeK, weightK and weightG optional input arguments are missing.)
[in]nodeK: The input contiguous vector argument of the same type and kind as abserr, of size \(n + 1\), where \(n\) is the number of points in the Gauss rule to be used for the integration.
It contains the nodes of the \(n\)-points Gauss-Legendre quadrature rule and its \(n+1\)-points Kronrod extension rule.
The procedures under the generic interface setNodeWeightGK return this vector.
(optional. It can be present if and only if weightK and weightG optional input arguments are present and qrule is missing.)
[in]weightK: The input contiguous vector argument of the same type and kind as abserr, of size \(n + 1\), where \(n\) is the number of points in the Gauss rule to be used for the integration.
It contains the Kronrod optimal extension weights for the \(2n+1\)-points Gauss-Legendre-Kronrod quadrature method.
The procedures under the generic interface setNodeWeightGK return this vector.
(optional. It can be present if and only if nodeK and weightG optional input arguments are present and qrule is missing.)
[in]weightG: The input contiguous vector argument of the same type and kind as abserr, of size \((n + 1)/2\), where \(n\) is the number of points in the Gauss rule to be used for the integration.
It contains the weights for the \(n\)-points Gauss-Legendre quadrature method.
The procedures under the generic interface setNodeWeightGK return this vector.
(optional. It can be present if and only if nodeK and weightK optional input arguments are present and qrule is missing.)
[out]abserr: The output scalar argument of type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128), representing the estimated absolute error in the resulting integral.
[out]intAbsFunc: The output scalar argument of the same type and kind as abserr, representing the integral of the absolute value of the input integrand function getFunc() over the specified range [lb, ub].
This output is not of primary use to the end users, but is required for computation of global error and the stopping rule in Global Adaptive Quadrature algorithms.
[out]smoothness: The output scalar argument of the same type and kind as abserr, representing a measure of the smoothness of the input integrand function getFunc() over the specified range [lb, ub].
This output is not of primary use to the end users, but is required for computation of global error and the stopping rule in Global Adaptive Quadrature algorithms.
Returns
quadGK : The output scalar of the same type and kind as the output abserr, containing the integral of the specified integrand getFunc() over the specified range [lb, ub].


Possible calling interfaces

quadGK = getQuadGK(getFunc, lb, ub, qrule, abserr, intAbsFunc, smoothness)
quadGK = getQuadGK(getFunc, lb, ub, nodeK, weightK, weightG, abserr, intAbsFunc, smoothness)
Compute the 1D integral of the input scalar integrand getFunc on the finite or infinite interval [a,...
This module contains classes and procedures for non-adaptive and adaptive global numerical quadrature...
Warning
The condition lb < ub must hold for the corresponding procedure argument.
Also, the conditions size(nodeK) == size(weightK) and ssize(weightG) == size(nodeK) / 2 must hold for the corresponding procedure arguments, if present.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1.
If the target function contains points of difficulties, singularities, or discontinuities, user must ensure the abscissas of the specified Gauss-Kronrod rule do not match such points.
Particularly, computing an integrand at its singularities can lead to undefined values that can lead to unexpected segmentation fault or propagation of NaN values within the computational flow or other strange errors that can be extremely difficult to debug.
A simple check can be added within the target integrand implementations to ensure no such difficulty point matches an input value at which the function must be evaluated.
Alternatively, one should consider using the adaptive integration routines isFailedQuad or getQuadErr while setting their input help arguments to the points of difficulties of the integrand.
Remarks
The procedures under discussion are impure.
See also
Robert Piessens, Maria Branders, 1974, A Note on the Optimal Addition of Abscissas to Quadrature Formulas of Gauss and Lobatto, Mathematics of Computation, 28, 125, 135-139.
Laurie, 1997, Calculation of gauss-kronrod quadrature rules.
Kronrod, 1965, Nodes and weights of quadrature formulas.
FORTRAN90 version by John Burkardt.


Example usage

1program example
2
3 use pm_kind, only: SK, IK, RK => RKH ! All other real kinds are also supported.
4 use pm_quadpack, only: getQuadGK, ninf, pinf
5 use pm_quadpack, only: setNodeWeightGK
6 use pm_quadpack, only: GK15, GK21
7 use pm_quadpack, only: GK31, GK41
8 use pm_quadpack, only: GK51, GK61
9 use pm_io, only: display_type
10
11 implicit none
12
13 real(RK) :: integral, abserr, intAbsFunc, smoothness, truth
14
15 type(display_type) :: disp
16 disp = display_type(file = "main.out.F90")
17
18 call disp%skip()
19 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
20 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
21 call disp%show("! Gauss-Kronrod quadrature over a finite interval.")
22 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
23 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
24 call disp%skip()
25
26 call disp%skip()
27 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
28 call disp%show("! Compute the Gauss-Kronrod quadrature of the probability density function of the Beta distribution.")
29 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
30 call disp%skip()
31
32 truth = 1._RK
33
34 call disp%skip()
35 call disp%show("integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK15, abserr, intAbsFunc, smoothness)")
36 integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK15, abserr, intAbsFunc, smoothness)
37 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
38 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
39 call disp%skip()
40
41 call disp%skip()
42 call disp%show("integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK21, abserr, intAbsFunc, smoothness)")
43 integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK21, abserr, intAbsFunc, smoothness)
44 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
45 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
46 call disp%skip()
47
48 call disp%skip()
49 call disp%show("integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK41, abserr, intAbsFunc, smoothness)")
50 integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK41, abserr, intAbsFunc, smoothness)
51 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
52 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
53 call disp%skip()
54
55 call disp%skip()
56 call disp%show("integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK51, abserr, intAbsFunc, smoothness)")
57 integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK51, abserr, intAbsFunc, smoothness)
58 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
59 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
60 call disp%skip()
61
62 call disp%skip()
63 call disp%show("integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK61, abserr, intAbsFunc, smoothness)")
64 integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK61, abserr, intAbsFunc, smoothness)
65 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
66 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
67 call disp%skip()
68
69 call disp%skip()
70 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
71 call disp%show("! Compute the Gauss-Kronrod quadrature of the probability density function of the Beta distribution for non-default node counts.")
72 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
73 call disp%skip()
74
75 block
76 integer(IK) , parameter :: MAX_NPG = 30_IK
77 integer(IK) :: npg
78 real(RK) :: nodeK(MAX_NPG+1), weightK(MAX_NPG+1), weightG((MAX_NPG+1)/2)
79 do npg = 1_IK, MAX_NPG
80 call disp%skip()
81 call disp%show("npg ! The number of points in the Gauss-Legendre quadrature rule.")
82 call disp%show( npg )
83 call disp%show("call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights")
84 call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2))
85 call disp%show("integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.")
86 integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness)
87 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
88 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
89 call disp%skip()
90 end do
91 end block
92
93 call disp%skip()
94 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
95 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
96 call disp%show("! Gauss-Kronrod quadrature over a positive semi-infinite interval.")
97 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
98 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
99 call disp%skip()
100
101 call disp%skip()
102 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
103 call disp%show("! Compute the Gauss-Kronrod quadrature of the probability density function of the LogNormal distribution on the semi-infinite range `(0,+infinity)`.")
104 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
105 call disp%skip()
106
107 truth = 1._RK
108
109 call disp%skip()
110 call disp%show("integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK15, abserr, intAbsFunc, smoothness)")
111 integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK15, abserr, intAbsFunc, smoothness)
112 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
113 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
114 call disp%skip()
115
116 call disp%skip()
117 call disp%show("integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK21, abserr, intAbsFunc, smoothness)")
118 integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK21, abserr, intAbsFunc, smoothness)
119 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
120 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
121 call disp%skip()
122
123 call disp%skip()
124 call disp%show("integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK41, abserr, intAbsFunc, smoothness)")
125 integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK41, abserr, intAbsFunc, smoothness)
126 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
127 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
128 call disp%skip()
129
130 call disp%skip()
131 call disp%show("integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK51, abserr, intAbsFunc, smoothness)")
132 integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK51, abserr, intAbsFunc, smoothness)
133 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
134 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
135 call disp%skip()
136
137 call disp%skip()
138 call disp%show("integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK61, abserr, intAbsFunc, smoothness)")
139 integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK61, abserr, intAbsFunc, smoothness)
140 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
141 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
142 call disp%skip()
143
144 call disp%skip()
145 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
146 call disp%show("! Compute the Gauss-Kronrod quadrature of the probability density function of the LogNormal distribution for non-default node counts.")
147 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
148 call disp%skip()
149
150 block
151 integer(IK) , parameter :: MAX_NPG = 30_IK
152 integer(IK) :: npg
153 real(RK) :: nodeK(MAX_NPG+1), weightK(MAX_NPG+1), weightG((MAX_NPG+1)/2)
154 do npg = 1_IK, MAX_NPG
155 call disp%skip()
156 call disp%show("npg ! The number of points in the Gauss-Legendre quadrature rule.")
157 call disp%show( npg )
158 call disp%show("call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights")
159 call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2))
160 call disp%show("integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.")
161 integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness)
162 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
163 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
164 call disp%skip()
165 end do
166 end block
167
168 call disp%skip()
169 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
170 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
171 call disp%show("! Gauss-Kronrod quadrature over a negative semi-infinite interval.")
172 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
173 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
174 call disp%skip()
175
176 call disp%skip()
177 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
178 call disp%show("! Compute the Gauss-Kronrod quadrature of the probability density function of the Exponential distribution on the semi-infinite range `(-infinity,0)`.")
179 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
180 call disp%skip()
181
182 truth = 1._RK
183
184 call disp%skip()
185 call disp%show("integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK15, abserr, intAbsFunc, smoothness)")
186 integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK15, abserr, intAbsFunc, smoothness)
187 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
188 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
189 call disp%skip()
190
191 call disp%skip()
192 call disp%show("integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK21, abserr, intAbsFunc, smoothness)")
193 integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK21, abserr, intAbsFunc, smoothness)
194 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
195 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
196 call disp%skip()
197
198 call disp%skip()
199 call disp%show("integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK41, abserr, intAbsFunc, smoothness)")
200 integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK41, abserr, intAbsFunc, smoothness)
201 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
202 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
203 call disp%skip()
204
205 call disp%skip()
206 call disp%show("integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK51, abserr, intAbsFunc, smoothness)")
207 integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK51, abserr, intAbsFunc, smoothness)
208 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
209 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
210 call disp%skip()
211
212 call disp%skip()
213 call disp%show("integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK61, abserr, intAbsFunc, smoothness)")
214 integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK61, abserr, intAbsFunc, smoothness)
215 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
216 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
217 call disp%skip()
218
219 call disp%skip()
220 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
221 call disp%show("! Compute the Gauss-Kronrod quadrature of the probability density function of the Exponential distribution for non-default node counts.")
222 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
223 call disp%skip()
224
225 block
226 integer(IK) , parameter :: MAX_NPG = 30_IK
227 integer(IK) :: npg
228 real(RK) :: nodeK(MAX_NPG+1), weightK(MAX_NPG+1), weightG((MAX_NPG+1)/2)
229 do npg = 1_IK, MAX_NPG
230 call disp%skip()
231 call disp%show("npg ! The number of points in the Gauss-Legendre quadrature rule.")
232 call disp%show( npg )
233 call disp%show("call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights")
234 call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2))
235 call disp%show("integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.")
236 integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness)
237 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
238 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
239 call disp%skip()
240 end do
241 end block
242
243 call disp%skip()
244 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
245 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
246 call disp%show("! Gauss-Kronrod quadrature over a full infinite interval (-infinity, +infinity).")
247 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
248 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
249 call disp%skip()
250
251 call disp%skip()
252 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
253 call disp%show("! Compute the Gauss-Kronrod quadrature of the probability density function of the Normal distribution on the infinite range `(-infinity,+infinity)`.")
254 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
255 call disp%skip()
256
257 truth = 1._RK
258
259 call disp%skip()
260 call disp%show("integral = getQuadGK(getNormPDF, ninf, pinf, GK15, abserr, intAbsFunc, smoothness)")
261 integral = getQuadGK(getNormPDF, ninf, pinf, GK15, abserr, intAbsFunc, smoothness)
262 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
263 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
264 call disp%skip()
265
266 call disp%skip()
267 call disp%show("integral = getQuadGK(getNormPDF, ninf, pinf, GK21, abserr, intAbsFunc, smoothness)")
268 integral = getQuadGK(getNormPDF, ninf, pinf, GK21, abserr, intAbsFunc, smoothness)
269 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
270 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
271 call disp%skip()
272
273 call disp%skip()
274 call disp%show("integral = getQuadGK(getNormPDF, ninf, pinf, GK41, abserr, intAbsFunc, smoothness)")
275 integral = getQuadGK(getNormPDF, ninf, pinf, GK41, abserr, intAbsFunc, smoothness)
276 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
277 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
278 call disp%skip()
279
280 call disp%skip()
281 call disp%show("integral = getQuadGK(getNormPDF, ninf, pinf, GK51, abserr, intAbsFunc, smoothness)")
282 integral = getQuadGK(getNormPDF, ninf, pinf, GK51, abserr, intAbsFunc, smoothness)
283 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
284 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
285 call disp%skip()
286
287 call disp%skip()
288 call disp%show("integral = getQuadGK(getNormPDF, ninf, pinf, GK61, abserr, intAbsFunc, smoothness)")
289 integral = getQuadGK(getNormPDF, ninf, pinf, GK61, abserr, intAbsFunc, smoothness)
290 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
291 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
292 call disp%skip()
293
294 call disp%skip()
295 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
296 call disp%show("! Compute the Gauss-Kronrod quadrature of the probability density function of the Normal distribution for non-default node counts.")
297 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
298 call disp%skip()
299
300 block
301 integer(IK) , parameter :: MAX_NPG = 30_IK
302 integer(IK) :: npg
303 real(RK) :: nodeK(MAX_NPG+1), weightK(MAX_NPG+1), weightG((MAX_NPG+1)/2)
304 do npg = 1_IK, MAX_NPG
305 call disp%skip()
306 call disp%show("npg ! The number of points in the Gauss-Legendre quadrature rule.")
307 call disp%show( npg )
308 call disp%show("call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights")
309 call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2))
310 call disp%show("integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.")
311 integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness)
312 call disp%show("[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]")
313 call disp%show( [truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)] )
314 call disp%skip()
315 end do
316 end block
317
318contains
319
320 function getBetaPDF(x) result(pdf)
321 use pm_distBeta, only: getBetaLogPDF
322 real(RK) , intent(in) :: x
323 real(RK) :: pdf
324 pdf = exp(getBetaLogPDF(x, alpha = 2._RK, beta = 2._RK))
325 end function
326
327 function getLogNormPDF(x) result(pdf)
329 real(RK) , intent(in) :: x
330 real(RK) :: pdf
331 pdf = exp(getLogNormLogPDF(x))
332 end function
333
334 function getNegExpPDF(x) result(pdf)
335 use pm_distExp, only: getExpLogPDF
336 real(RK) , intent(in) :: x
337 real(RK) :: pdf
338 pdf = exp(getExpLogPDF(-x))
339 end function
340
341 function getNormPDF(x) result(pdf)
342 use pm_distNorm, only: getNormLogPDF
343 real(RK) , intent(in) :: x
344 real(RK) :: pdf
345 pdf = exp(getNormLogPDF(x))
346 end function
347
348end program example
Generate and return the natural logarithm of the Probability Density Function (PDF) of the Beta distr...
Generate and return the natural logarithm of the Probability Density Function (PDF) of the Exponentia...
Definition: pm_distExp.F90:221
Generate the natural logarithm of probability density function (PDF) of the univariate Lognormal dist...
Generate the natural logarithm of probability density function (PDF) of the univariate Normal distrib...
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
Return the Kronrod nodes and weights of the extension to the -point Gauss-Legendre quadrature,...
This module contains classes and procedures for computing various statistical quantities related to t...
Definition: pm_distBeta.F90:99
This module contains classes and procedures for computing various statistical quantities related to t...
Definition: pm_distExp.F90:112
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
integer, parameter RKH
The scalar integer constant of intrinsic default kind, representing the highest-precision real kind t...
Definition: pm_kind.F90:858
type(GK31_type), parameter GK31
The scalar constant object of type GK31_type that indicates the use of 15-point Gauss-Legendre quadra...
type(GK51_type), parameter GK51
The scalar constant object of type GK51_type that indicates the use of 25-point Gauss-Legendre quadra...
type(GK61_type), parameter GK61
The scalar constant object of type GK61_type that indicates the use of 30-point Gauss-Legendre quadra...
type(GK21_type), parameter GK21
The scalar constant object of type GK21_type that indicates the use of 10-point Gauss-Legendre quadra...
type(GK15_type), parameter GK15
The scalar constant object of type GK15_type that indicates the use of 7-point Gauss-Legendre quadrat...
type(GK41_type), parameter GK41
The scalar constant object of type GK41_type that indicates the use of 20-point Gauss-Legendre quadra...
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1
2!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4! Gauss-Kronrod quadrature over a finite interval.
5!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7
8
9!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10! Compute the Gauss-Kronrod quadrature of the probability density function of the Beta distribution.
11!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12
13
14integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK15, abserr, intAbsFunc, smoothness)
15[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
16+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000000, +0.962964972193617926527988971292463659E-32, +1.00000000000000000000000000000000000, +0.332350865347540181865392442941994453, +0.00000000000000000000000000000000000
17
18
19integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK21, abserr, intAbsFunc, smoothness)
20[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
21+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999904, +0.962964972193617926527988971292463541E-32, +0.999999999999999999999999999999999904, +0.348820029290895558486501301340103054, +0.962964972193617926527988971292463659E-34
22
23
24integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK41, abserr, intAbsFunc, smoothness)
25[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
26+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999904, +0.962964972193617926527988971292463541E-32, +0.999999999999999999999999999999999904, +0.365617398082792305848065507834403699, +0.962964972193617926527988971292463659E-34
27
28
29integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK51, abserr, intAbsFunc, smoothness)
30[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
31+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999807, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999807, +0.369298545656546792050550199588929904, +0.192592994438723585305597794258492732E-33
32
33
34integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, GK61, abserr, intAbsFunc, smoothness)
35[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
36+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999904, +0.962964972193617926527988971292463541E-32, +0.999999999999999999999999999999999904, +0.372002569341007109923787616661336924, +0.962964972193617926527988971292463659E-34
37
38
39!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40! Compute the Gauss-Kronrod quadrature of the probability density function of the Beta distribution for non-default node counts.
41!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
42
43
44npg ! The number of points in the Gauss-Legendre quadrature rule.
45+1
46call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
47integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
48[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
49+1.00000000000000000000000000000000000, +0.480421111969383347900839915541048870, +0.270837007627134129622102202568011808, +0.480421111969383347900839915541048870, +0.270837007627134129622102202568011808, +0.519578888030616652099160084458951130
50
51
52npg ! The number of points in the Gauss-Legendre quadrature rule.
53+2
54call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
55integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
56[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
57+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000019, +0.962964972193617926527988971292463897E-32, +1.00000000000000000000000000000000019, +0.205050505050505050505050505050505040, +0.192592994438723585305597794258492732E-33
58
59
60npg ! The number of points in the Gauss-Legendre quadrature rule.
61+3
62call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
63integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
64[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
65+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999807, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999807, +0.313218923737658024129334619196987163, +0.192592994438723585305597794258492732E-33
66
67
68npg ! The number of points in the Gauss-Legendre quadrature rule.
69+4
70call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
71integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
72[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
73+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999807, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999807, +0.315930942664627962287706737178712867, +0.192592994438723585305597794258492732E-33
74
75
76npg ! The number of points in the Gauss-Legendre quadrature rule.
77+5
78call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
79integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
80[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
81+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999904, +0.962964972193617926527988971292463541E-32, +0.999999999999999999999999999999999904, +0.321609174541580455838518696237276792, +0.962964972193617926527988971292463659E-34
82
83
84npg ! The number of points in the Gauss-Legendre quadrature rule.
85+6
86call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
87integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
88[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
89+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999711, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999711, +0.337728935330107303671417159619312911, +0.288889491658085377958396691387739098E-33
90
91
92npg ! The number of points in the Gauss-Legendre quadrature rule.
93+7
94call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
95integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
96[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
97+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999422, +0.962964972193617926527988971292463066E-32, +0.999999999999999999999999999999999422, +0.332350865347540181865392442941993586, +0.577778983316170755916793382775478196E-33
98
99
100npg ! The number of points in the Gauss-Legendre quadrature rule.
101+8
102call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
103integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
104[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
105+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000000, +0.962964972193617926527988971292463659E-32, +1.00000000000000000000000000000000000, +0.345422184218279383037014278751830416, +0.00000000000000000000000000000000000
106
107
108npg ! The number of points in the Gauss-Legendre quadrature rule.
109+9
110call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
111integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
112[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
113+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000019, +0.962964972193617926527988971292463897E-32, +1.00000000000000000000000000000000019, +0.348302550445394272753570649136973960, +0.192592994438723585305597794258492732E-33
114
115
116npg ! The number of points in the Gauss-Legendre quadrature rule.
117+10
118call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
119integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
120[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
121+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999807, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999807, +0.348820029290895558486501301340102573, +0.192592994438723585305597794258492732E-33
122
123
124npg ! The number of points in the Gauss-Legendre quadrature rule.
125+11
126call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
127integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
128[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
129+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000019, +0.962964972193617926527988971292463897E-32, +1.00000000000000000000000000000000019, +0.354999841253936686479701825785108681, +0.192592994438723585305597794258492732E-33
130
131
132npg ! The number of points in the Gauss-Legendre quadrature rule.
133+12
134call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
135integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
136[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
137+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000039, +0.962964972193617926527988971292464015E-32, +1.00000000000000000000000000000000039, +0.354157860946384654881202770232920338, +0.385185988877447170611195588516985464E-33
138
139
140npg ! The number of points in the Gauss-Legendre quadrature rule.
141+13
142call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
143integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
144[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
145+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000000, +0.962964972193617926527988971292463659E-32, +1.00000000000000000000000000000000000, +0.358244419047881521537644154374837196, +0.00000000000000000000000000000000000
146
147
148npg ! The number of points in the Gauss-Legendre quadrature rule.
149+14
150call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
151integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
152[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
153+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999807, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999807, +0.360043536617096848677395286636972682, +0.192592994438723585305597794258492732E-33
154
155
156npg ! The number of points in the Gauss-Legendre quadrature rule.
157+15
158call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
159integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
160[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
161+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999807, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999807, +0.359770623875105141649427242169437024, +0.192592994438723585305597794258492732E-33
162
163
164npg ! The number of points in the Gauss-Legendre quadrature rule.
165+16
166call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
167integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
168[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
169+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999904, +0.962964972193617926527988971292463541E-32, +0.999999999999999999999999999999999904, +0.363157479470576703962170302649563992, +0.962964972193617926527988971292463659E-34
170
171
172npg ! The number of points in the Gauss-Legendre quadrature rule.
173+17
174call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
175integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
176[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
177+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000000, +0.962964972193617926527988971292463659E-32, +1.00000000000000000000000000000000000, +0.363109511055304158303972009711228538, +0.00000000000000000000000000000000000
178
179
180npg ! The number of points in the Gauss-Legendre quadrature rule.
181+18
182call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
183integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
184[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
185+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999807, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999807, +0.364796933312968640518518780790230271, +0.192592994438723585305597794258492732E-33
186
187
188npg ! The number of points in the Gauss-Legendre quadrature rule.
189+19
190call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
191integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
192[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
193+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999807, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999807, +0.366088266354431031746529998266692271, +0.192592994438723585305597794258492732E-33
194
195
196npg ! The number of points in the Gauss-Legendre quadrature rule.
197+20
198call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
199integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
200[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
201+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000000, +0.962964972193617926527988971292463659E-32, +1.00000000000000000000000000000000000, +0.365617398082792305848065507834402592, +0.00000000000000000000000000000000000
202
203
204npg ! The number of points in the Gauss-Legendre quadrature rule.
205+21
206call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
207integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
208[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
209+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999711, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999711, +0.367821045564605980960034310589386864, +0.288889491658085377958396691387739098E-33
210
211
212npg ! The number of points in the Gauss-Legendre quadrature rule.
213+22
214call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
215integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
216[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
217+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000058, +0.962964972193617926527988971292464253E-32, +1.00000000000000000000000000000000058, +0.367991165630253018476809914215071252, +0.577778983316170755916793382775478196E-33
218
219
220npg ! The number of points in the Gauss-Legendre quadrature rule.
221+23
222call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
223integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
224[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
225+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999615, +0.962964972193617926527988971292463303E-32, +0.999999999999999999999999999999999615, +0.368768410353483515935716732597477937, +0.385185988877447170611195588516985464E-33
226
227
228npg ! The number of points in the Gauss-Legendre quadrature rule.
229+24
230call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
231integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
232[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
233+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999711, +0.962964972193617926527988971292463422E-32, +0.999999999999999999999999999999999711, +0.369761279627099167963894850246886530, +0.288889491658085377958396691387739098E-33
234
235
236npg ! The number of points in the Gauss-Legendre quadrature rule.
237+25
238call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
239integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
240[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
241+1.00000000000000000000000000000000000, +0.999999999999999999999999999999999615, +0.962964972193617926527988971292463303E-32, +0.999999999999999999999999999999999615, +0.369298545656546792050550199588930818, +0.385185988877447170611195588516985464E-33
242
243
244npg ! The number of points in the Gauss-Legendre quadrature rule.
245+26
246call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
247integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
248[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
249+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000000, +0.962964972193617926527988971292463659E-32, +1.00000000000000000000000000000000000, +0.370827437016519009582483758754977133, +0.00000000000000000000000000000000000
250
251
252npg ! The number of points in the Gauss-Legendre quadrature rule.
253+27
254call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
255integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
256[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
257+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000039, +0.962964972193617926527988971292464015E-32, +1.00000000000000000000000000000000039, +0.371074860800886503248166477335971387, +0.385185988877447170611195588516985464E-33
258
259
260npg ! The number of points in the Gauss-Legendre quadrature rule.
261+28
262call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
263integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
264[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
265+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000077, +0.962964972193617926527988971292464371E-32, +1.00000000000000000000000000000000077, +0.371427050294648513107276864275321340, +0.770371977754894341222391177033970927E-33
266
267
268npg ! The number of points in the Gauss-Legendre quadrature rule.
269+29
270call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
271integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
272[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
273+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000019, +0.962964972193617926527988971292463897E-32, +1.00000000000000000000000000000000019, +0.372223979361284634235934277787081296, +0.192592994438723585305597794258492732E-33
274
275
276npg ! The number of points in the Gauss-Legendre quadrature rule.
277+30
278call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
279integral = getQuadGK(getBetaPDF, 0._RK, +1._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
280[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
281+1.00000000000000000000000000000000000, +1.00000000000000000000000000000000000, +0.962964972193617926527988971292463659E-32, +1.00000000000000000000000000000000000, +0.372002569341007109923787616661335335, +0.00000000000000000000000000000000000
282
283
284!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
285!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
286! Gauss-Kronrod quadrature over a positive semi-infinite interval.
287!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
288!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
289
290
291!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
292! Compute the Gauss-Kronrod quadrature of the probability density function of the LogNormal distribution on the semi-infinite range `(0,+infinity)`.
293!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
294
295
296integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK15, abserr, intAbsFunc, smoothness)
297[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
298+1.00000000000000000000000000000000000, +0.999997299690519869241720281259818052, +0.256665312152048430438215466789267068E-1, +0.999997299690519869241720281259818052, +0.405482311281071585135996295867852563, +0.270030948013075827971874018194840906E-5
299
300
301integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK21, abserr, intAbsFunc, smoothness)
302[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
303+1.00000000000000000000000000000000000, +1.00000009798761157060346918719858444, +0.295193558106936309656912906523764044E-2, +1.00000009798761157060346918719858444, +0.426989872574134944871374539334134092, +0.979876115706034691871985844378680066E-7
304
305
306integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK41, abserr, intAbsFunc, smoothness)
307[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
308+1.00000000000000000000000000000000000, +0.999999999795081386330293090324938485, +0.125441756876698348170916154866295533E-5, +0.999999999795081386330293090324938485, +0.446857633223355518536040613616829822, +0.204918613669706909675061515079233957E-9
309
310
311integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK51, abserr, intAbsFunc, smoothness)
312[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
313+1.00000000000000000000000000000000000, +0.999999999955606206754649785466436600, +0.391224786873945559603990633870625383E-7, +0.999999999955606206754649785466436600, +0.451151051357497766162941844671249309, +0.443937932453502145335634001947330452E-10
314
315
316integral = getQuadGK(getLogNormPDF, 0._RK, pinf, GK61, abserr, intAbsFunc, smoothness)
317[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
318+1.00000000000000000000000000000000000, +0.999999999995853818011903866479753249, +0.225157476189573037457067065221885697E-10, +0.999999999995853818011903866479753249, +0.454073139160562458663076636221205096, +0.414618198809613352024675133634889360E-11
319
320
321!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322! Compute the Gauss-Kronrod quadrature of the probability density function of the LogNormal distribution for non-default node counts.
323!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
324
325
326npg ! The number of points in the Gauss-Legendre quadrature rule.
327+1
328call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
329integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
330[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
331+1.00000000000000000000000000000000000, +0.440654390519982570923254671966087876, +0.263157810538753065658119728890170155, +0.440654390519982570923254671966087876, +0.263157810538753065658119728890170155, +0.559345609480017429076745328033912172
332
333
334npg ! The number of points in the Gauss-Legendre quadrature rule.
335+2
336call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
337integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
338[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
339+1.00000000000000000000000000000000000, +1.00115159535561551677250223806146437, +0.248267677849831406984651517189212306, +1.00115159535561551677250223806146437, +0.248267677849831406984651517189212306, +0.115159535561551677250223806146437201E-2
340
341
342npg ! The number of points in the Gauss-Legendre quadrature rule.
343+3
344call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
345integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
346[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
347+1.00000000000000000000000000000000000, +1.00040478970647333319876225416181032, +0.386544757028673834265268612489689942, +1.00040478970647333319876225416181032, +0.386544757028673834265268612489689942, +0.404789706473333198762254161810319913E-3
348
349
350npg ! The number of points in the Gauss-Legendre quadrature rule.
351+4
352call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
353integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
354[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
355+1.00000000000000000000000000000000000, +1.00002610414724307748322615021718026, +0.386231062970553098636444648476170314, +1.00002610414724307748322615021718026, +0.386231062970553098636444648476170314, +0.261041472430774832261502171802586866E-4
356
357
358npg ! The number of points in the Gauss-Legendre quadrature rule.
359+5
360call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
361integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
362[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
363+1.00000000000000000000000000000000000, +0.999985810059247339669805714912328236, +0.394991742073170665588114892341666176, +0.999985810059247339669805714912328236, +0.394991742073170665588114892341666176, +0.141899407526603301942850876717643897E-4
364
365
366npg ! The number of points in the Gauss-Legendre quadrature rule.
367+6
368call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
369integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
370[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
371+1.00000000000000000000000000000000000, +0.999991153146646905609618866850569932, +0.201055388449807341789299677668162966E-2, +0.999991153146646905609618866850569932, +0.413788278103359200140993657807761858, +0.884685335309439038113314943006817385E-5
372
373
374npg ! The number of points in the Gauss-Legendre quadrature rule.
375+7
376call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
377integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
378[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
379+1.00000000000000000000000000000000000, +0.999997299690519869241720281259817474, +0.256665312152048430438215466789497668E-1, +0.999997299690519869241720281259817474, +0.405482311281071585135996295867851504, +0.270030948013075827971874018252618804E-5
380
381
382npg ! The number of points in the Gauss-Legendre quadrature rule.
383+8
384call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
385integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
386[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
387+1.00000000000000000000000000000000000, +0.999999381352227797311100131928905262, +0.183053043078258033477296544446724386E-1, +0.999999381352227797311100131928905262, +0.423097534055426140755284335767787928, +0.618647772202688899868071094737841243E-6
388
389
390npg ! The number of points in the Gauss-Legendre quadrature rule.
391+9
392call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
393integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
394[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
395+1.00000000000000000000000000000000000, +0.999999990612983549879343252846014940, +0.818358877620782547271452401299804686E-2, +0.999999990612983549879343252846014940, +0.425704502695006040033705707820210107, +0.938701645012065674715398505995817499E-8
396
397
398npg ! The number of points in the Gauss-Legendre quadrature rule.
399+10
400call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
401integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
402[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
403+1.00000000000000000000000000000000000, +1.00000009798761157060346918719858444, +0.295193558106936309656912906523764233E-2, +1.00000009798761157060346918719858444, +0.426989872574134944871374539334133514, +0.979876115706034691871985844378680066E-7
404
405
406npg ! The number of points in the Gauss-Legendre quadrature rule.
407+11
408call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
409integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
410[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
411+1.00000000000000000000000000000000000, +1.00000007745615047036466107235347550, +0.899333271967751714425000608569671298E-3, +1.00000007745615047036466107235347550, +0.434133277977773222279492925965094215, +0.774561504703646610723534755037693165E-7
412
413
414npg ! The number of points in the Gauss-Legendre quadrature rule.
415+12
416call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
417integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
418[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
419+1.00000000000000000000000000000000000, +1.00000004799397022376443202052945016, +0.227785342107320067761047547616597876E-3, +1.00000004799397022376443202052945016, +0.432341032766134749110172349751338347, +0.479939702237644320205294501602025633E-7
420
421
422npg ! The number of points in the Gauss-Legendre quadrature rule.
423+13
424call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
425integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
426[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
427+1.00000000000000000000000000000000000, +1.00000002468784697448240228843729433, +0.391085523137819425490135854698818053E-4, +1.00000002468784697448240228843729433, +0.438129154649774798484788272162522590, +0.246878469744824022884372943262141470E-7
428
429
430npg ! The number of points in the Gauss-Legendre quadrature rule.
431+14
432call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
433integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
434[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
435+1.00000000000000000000000000000000000, +1.00000001214523492936835710483860060, +0.869361016703036103633369759211822842E-6, +1.00000001214523492936835710483860060, +0.439848436180187079104872956531366532, +0.121452349293683571048386005983282358E-7
436
437
438npg ! The number of points in the Gauss-Legendre quadrature rule.
439+15
440call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
441integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
442[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
443+1.00000000000000000000000000000000000, +1.00000000524709950801412578397433880, +0.453855310215365294604835174030162360E-5, +1.00000000524709950801412578397433880, +0.439938137444660635481863189048735278, +0.524709950801412578397433879702286054E-8
444
445
446npg ! The number of points in the Gauss-Legendre quadrature rule.
447+16
448call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
449integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
450[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
451+1.00000000000000000000000000000000000, +1.00000000207728443433581482672936140, +0.634663524822756477103426987347064793E-5, +1.00000000207728443433581482672936140, +0.443801817673865015557406858740782638, +0.207728443433581482672936140386060941E-8
452
453
454npg ! The number of points in the Gauss-Legendre quadrature rule.
455+17
456call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
457integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
458[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
459+1.00000000000000000000000000000000000, +1.00000000060138193848116631223235291, +0.527551248353347731943956964631672420E-5, +1.00000000060138193848116631223235291, +0.443283372221765898366160921339535976, +0.601381938481166312232352911385048352E-9
460
461
462npg ! The number of points in the Gauss-Legendre quadrature rule.
463+18
464call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
465integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
466[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
467+1.00000000000000000000000000000000000, +1.00000000002337684456012439615534067, +0.358328444953570690596202537321935925E-5, +1.00000000002337684456012439615534067, +0.445857503888062707775638352030904815, +0.233768445601243961553406690044477554E-10
468
469
470npg ! The number of points in the Gauss-Legendre quadrature rule.
471+19
472call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
473integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
474[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
475+1.00000000000000000000000000000000000, +0.999999999827357937381159052944207481, +0.219175345657139401480060276808435034E-5, +0.999999999827357937381159052944207481, +0.447116124776096284469552631143427524, +0.172642062618840947055792519112665077E-9
476
477
478npg ! The number of points in the Gauss-Legendre quadrature rule.
479+20
480call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
481integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
482[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
483+1.00000000000000000000000000000000000, +0.999999999795081386330293090324938581, +0.125441756876698348170916154825542999E-5, +0.999999999795081386330293090324938581, +0.446857633223355518536040613616828666, +0.204918613669706909675061418782736738E-9
484
485
486npg ! The number of points in the Gauss-Legendre quadrature rule.
487+21
488call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
489integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
490[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
491+1.00000000000000000000000000000000000, +0.999999999823694334447531529435443256, +0.680808135708412824895859552233285701E-6, +0.999999999823694334447531529435443256, +0.449341868923503714056919684482635832, +0.176305665552468470564556744368424523E-9
492
493
494npg ! The number of points in the Gauss-Legendre quadrature rule.
495+22
496call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
497integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
498[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
499+1.00000000000000000000000000000000000, +0.999999999863908587433285676154034471, +0.355423836548274635452003188878673935E-6, +0.999999999863908587433285676154034471, +0.449228245653034840442224144352105582, +0.136091412566714323845965528887489281E-9
500
501
502npg ! The number of points in the Gauss-Legendre quadrature rule.
503+23
504call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
505integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
506[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
507+1.00000000000000000000000000000000000, +0.999999999903139510554949594591368601, +0.178094484871936054857683960232484674E-6, +0.999999999903139510554949594591368601, +0.450553065813618873446119310989872083, +0.968604894450504054086313994102149628E-10
508
509
510npg ! The number of points in the Gauss-Legendre quadrature rule.
511+24
512call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
513integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
514[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
515+1.00000000000000000000000000000000000, +0.999999999932930631263633182006277053, +0.855734277235847496242840188933614528E-7, +0.999999999932930631263633182006277053, +0.451528553045033627003930017346024233, +0.670693687363668179937229473940755511E-10
516
517
518npg ! The number of points in the Gauss-Legendre quadrature rule.
519+25
520call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
521integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
522[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
523+1.00000000000000000000000000000000000, +0.999999999955606206754649785466436407, +0.391224786873945559603990633870624924E-7, +0.999999999955606206754649785466436407, +0.451151051357497766162941844671250223, +0.443937932453502145335635927877274839E-10
524
525
526npg ! The number of points in the Gauss-Legendre quadrature rule.
527+26
528call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
529integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
530[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
531+1.00000000000000000000000000000000000, +0.999999999970905117727407763552248053, +0.166381656789620823670390268592916473E-7, +0.999999999970905117727407763552248053, +0.452917709799272825368192692193337627, +0.290948822725922364477519471835892967E-10
532
533
534npg ! The number of points in the Gauss-Legendre quadrature rule.
535+27
536call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
537integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
538[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
539+1.00000000000000000000000000000000000, +0.999999999981605731220288947315054768, +0.635900931335095252218769876840873286E-8, +0.999999999981605731220288947315054768, +0.452975362039077355596520008820995626, +0.183942687797110526849452318238009307E-10
540
541
542npg ! The number of points in the Gauss-Legendre quadrature rule.
543+28
544call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
545integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
546[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
547+1.00000000000000000000000000000000000, +0.999999999988458222374742779201142540, +0.198293047631039098806185598651536761E-8, +0.999999999988458222374742779201142540, +0.453700584517001223519630031514656926, +0.115417776252572207988574595184290227E-10
548
549
550npg ! The number of points in the Gauss-Legendre quadrature rule.
551+29
552call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
553integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
554[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
555+1.00000000000000000000000000000000000, +0.999999999993028919150309836107382412, +0.360406915718640104801049386352887180E-9, +0.999999999993028919150309836107382412, +0.454485599724025982139655464268528114, +0.697108084969016389261758814270841309E-11
556
557
558npg ! The number of points in the Gauss-Legendre quadrature rule.
559+30
560call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
561integral = getQuadGK(getLogNormPDF, 0._RK, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
562[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
563+1.00000000000000000000000000000000000, +0.999999999995853818011903866479753441, +0.225157476189573037457066640688428599E-10, +0.999999999995853818011903866479753441, +0.454073139160562458663076636221203507, +0.414618198809613352024655874335445487E-11
564
565
566!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
567!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
568! Gauss-Kronrod quadrature over a negative semi-infinite interval.
569!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
570!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
571
572
573!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
574! Compute the Gauss-Kronrod quadrature of the probability density function of the Exponential distribution on the semi-infinite range `(-infinity,0)`.
575!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
576
577
578integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK15, abserr, intAbsFunc, smoothness)
579[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
580+1.00000000000000000000000000000000000, +0.999988720184957523299229441902971739, +0.130953042170013407205116866659253723, +0.999988720184957523299229441902971739, +0.360987087164080903818705208335354147, +0.112798150424767007705580970282614627E-4
581
582
583integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK21, abserr, intAbsFunc, smoothness)
584[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
585+1.00000000000000000000000000000000000, +0.999999712522646602555712267903352586, +0.394281111522053592055953332478795080E-2, +0.999999712522646602555712267903352586, +0.371198845179058062154806337429170749, +0.287477353397444287732096647413767875E-6
586
587
588integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK41, abserr, intAbsFunc, smoothness)
589[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
590+1.00000000000000000000000000000000000, +0.999999999999143892842612645906643183, +0.126486138635180210564939379072719019E-5, +0.999999999999143892842612645906643183, +0.389827823889725016049035817929207097, +0.856107157387354093356816508244575590E-12
591
592
593integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK51, abserr, intAbsFunc, smoothness)
594[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
595+1.00000000000000000000000000000000000, +0.999999999999706095141248995594219623, +0.120306553279929482668493821739714205E-7, +0.999999999999706095141248995594219623, +0.393261349650593471228577134032766011, +0.293904858751004405780377247901100785E-12
596
597
598integral = getQuadGK(getNegExpPDF, ninf, 0._RK, GK61, abserr, intAbsFunc, smoothness)
599[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
600+1.00000000000000000000000000000000000, +0.999999999999994449741852009521043167, +0.480174162526454614389666150421097766E-9, +0.999999999999994449741852009521043167, +0.395627116110533594340013051876057010, +0.555025814799047895683282359800705931E-14
601
602
603!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
604! Compute the Gauss-Kronrod quadrature of the probability density function of the Exponential distribution for non-default node counts.
605!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
606
607
608npg ! The number of points in the Gauss-Legendre quadrature rule.
609+1
610call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
611integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
612[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
613+1.00000000000000000000000000000000000, +0.465152268752918072254289065463138600, +0.450780275931411620238049429695317436, +0.465152268752918072254289065463138600, +0.450780275931411620238049429695317436, +0.534847731247081927745710934536861400
614
615
616npg ! The number of points in the Gauss-Legendre quadrature rule.
617+2
618call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
619integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
620[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
621+1.00000000000000000000000000000000000, +0.993995784474189554318199473478698773, +0.320257130357635972062367848790982374, +0.993995784474189554318199473478698773, +0.320257130357635972062367848790982374, +0.600421552581044568180052652130122712E-2
622
623
624npg ! The number of points in the Gauss-Legendre quadrature rule.
625+3
626call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
627integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
628[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
629+1.00000000000000000000000000000000000, +1.00116989368883751944965593015158218, +0.288407816885762028921436004985033274, +1.00116989368883751944965593015158218, +0.288407816885762028921436004985033274, +0.116989368883751944965593015158217523E-2
630
631
632npg ! The number of points in the Gauss-Legendre quadrature rule.
633+4
634call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
635integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
636[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
637+1.00000000000000000000000000000000000, +0.999962474988225534724621808479533236, +0.346633182820609748359837520363262047, +0.999962474988225534724621808479533236, +0.346633182820609748359837520363262047, +0.375250117744652753781915204667637893E-4
638
639
640npg ! The number of points in the Gauss-Legendre quadrature rule.
641+5
642call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
643integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
644[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
645+1.00000000000000000000000000000000000, +0.999917271688708191835899254119785907, +0.357614139126331604165322675905459262, +0.999917271688708191835899254119785907, +0.357614139126331604165322675905459262, +0.827283112918081641007458802140934290E-4
646
647
648npg ! The number of points in the Gauss-Legendre quadrature rule.
649+6
650call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
651integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
652[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
653+1.00000000000000000000000000000000000, +1.00004584972608091199187529639422302, +0.354689818530921880415446888891008752, +1.00004584972608091199187529639422302, +0.354689818530921880415446888891008752, +0.458497260809119918752963942230186808E-4
654
655
656npg ! The number of points in the Gauss-Legendre quadrature rule.
657+7
658call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
659integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
660[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
661+1.00000000000000000000000000000000000, +0.999988720184957523299229441902970968, +0.130953042170013407205116866659253820, +0.999988720184957523299229441902970968, +0.360987087164080903818705208335353810, +0.112798150424767007705580970290318346E-4
662
663
664npg ! The number of points in the Gauss-Legendre quadrature rule.
665+8
666call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
667integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
668[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
669+1.00000000000000000000000000000000000, +0.999999737877282040884408789404935311, +0.104313630258808378096852992916670532, +0.999999737877282040884408789404935311, +0.370882805968358101870328531227745722, +0.262122717959115591210595064688521019E-6
670
671
672npg ! The number of points in the Gauss-Legendre quadrature rule.
673+9
674call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
675integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
676[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
677+1.00000000000000000000000000000000000, +1.00000113929587339890250766731895615, +0.336995170665092687596900189876548626E-1, +1.00000113929587339890250766731895615, +0.373003134546996020236747448252998442, +0.113929587339890250766731895614727100E-5
678
679
680npg ! The number of points in the Gauss-Legendre quadrature rule.
681+10
682call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
683integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
684[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
685+1.00000000000000000000000000000000000, +0.999999712522646602555712267903352008, +0.394281111522053592055953332477525245E-2, +0.999999712522646602555712267903352008, +0.371198845179058062154806337429170556, +0.287477353397444287732096647991546858E-6
686
687
688npg ! The number of points in the Gauss-Legendre quadrature rule.
689+11
690call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
691integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
692[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
693+1.00000000000000000000000000000000000, +0.999999955628010135964682439661039338, +0.608762159041443814257813418391978064E-2, +0.999999955628010135964682439661039338, +0.377985875367886849594097848955329358, +0.443719898640353175603389606615429622E-7
694
695
696npg ! The number of points in the Gauss-Legendre quadrature rule.
697+12
698call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
699integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
700[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
701+1.00000000000000000000000000000000000, +1.00000003988943756347705981440599856, +0.391061675732572521103113365353415544E-3, +1.00000003988943756347705981440599856, +0.380991310274799249024648119260247617, +0.398894375634770598144059985610646165E-7
702
703
704npg ! The number of points in the Gauss-Legendre quadrature rule.
705+13
706call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
707integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
708[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
709+1.00000000000000000000000000000000000, +0.999999996824142199621839761270192643, +0.553075986852455692554344432302196187E-3, +0.999999996824142199621839761270192643, +0.381131274082204410178773247709703060, +0.317585780037816023872980735711444197E-8
710
711
712npg ! The number of points in the Gauss-Legendre quadrature rule.
713+14
714call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
715integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
716[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
717+1.00000000000000000000000000000000000, +0.999999996098210959627413750276591043, +0.284136313984086375723367133803188632E-3, +0.999999996098210959627413750276591043, +0.382358375124512159490138750433122479, +0.390178904037258624972340895700885898E-8
718
719
720npg ! The number of points in the Gauss-Legendre quadrature rule.
721+15
722call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
723integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
724[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
725+1.00000000000000000000000000000000000, +1.00000000105834863165323200179811621, +0.733115498805115894335605936817247415E-6, +1.00000000105834863165323200179811621, +0.385464648458985809445379932698855043, +0.105834863165323200179811620967559684E-8
726
727
728npg ! The number of points in the Gauss-Legendre quadrature rule.
729+16
730call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
731integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
732[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
733+1.00000000000000000000000000000000000, +1.00000000030760557703946814073323624, +0.418072966978908854673335993619181365E-4, +1.00000000030760557703946814073323624, +0.386435041279567106883776859686749016, +0.307605577039468140733236243335570430E-9
734
735
736npg ! The number of points in the Gauss-Legendre quadrature rule.
737+17
738call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
739integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
740[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
741+1.00000000000000000000000000000000000, +0.999999999805106955580477598252310548, +0.163653587112478524158783464040160933E-4, +0.999999999805106955580477598252310548, +0.385964855414799563702562330894797075, +0.194893044419522401747689452374784548E-9
742
743
744npg ! The number of points in the Gauss-Legendre quadrature rule.
745+18
746call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
747integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
748[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
749+1.00000000000000000000000000000000000, +0.999999999984872296146925256008294493, +0.631482917404629704127238706878584297E-7, +0.999999999984872296146925256008294493, +0.388304041968839473506247634014127384, +0.151277038530747439917055071431403196E-10
750
751
752npg ! The number of points in the Gauss-Legendre quadrature rule.
753+19
754call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
755integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
756[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
757+1.00000000000000000000000000000000000, +1.00000000003446334067061829844012351, +0.298669317606068900135117663540923642E-5, +1.00000000003446334067061829844012351, +0.389654481133599349340901822457812274, +0.344633406706182984401235116040139154E-10
758
759
760npg ! The number of points in the Gauss-Legendre quadrature rule.
761+20
762call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
763integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
764[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
765+1.00000000000000000000000000000000000, +0.999999999999143892842612645906642895, +0.126486138635180210564939378944414306E-5, +0.999999999999143892842612645906642895, +0.389827823889725016049035817929206663, +0.856107157387354093357105397736233675E-12
766
767
768npg ! The number of points in the Gauss-Legendre quadrature rule.
769+21
770call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
771integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
772[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
773+1.00000000000000000000000000000000000, +0.999999999993348385518010652693732013, +0.105623625710508113424814361590860027E-7, +0.999999999993348385518010652693732013, +0.390249986673095256227544732894765347, +0.665161448198934730626798680485574116E-11
774
775
776npg ! The number of points in the Gauss-Legendre quadrature rule.
777+22
778call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
779integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
780[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
781+1.00000000000000000000000000000000000, +1.00000000000026388740429523944878321, +0.207503648098122497758970997207426486E-6, +1.00000000000026388740429523944878321, +0.391778969164208658169124818875175198, +0.263887404295239448783209146515483157E-12
782
783
784npg ! The number of points in the Gauss-Legendre quadrature rule.
785+23
786call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
787integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
788[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
789+1.00000000000000000000000000000000000, +1.00000000000139749089833358688440042, +0.120055426998242915208027659967821290E-6, +1.00000000000139749089833358688440042, +0.392328320396891501061594473307040698, +0.139749089833358688440041707303318298E-11
790
791
792npg ! The number of points in the Gauss-Legendre quadrature rule.
793+24
794call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
795integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
796[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
797+1.00000000000000000000000000000000000, +1.00000000000004210003847747325082430, +0.941067985109693606649345436924871159E-8, +1.00000000000004210003847747325082430, +0.392142479067808623315143093761689052, +0.421000384774732508242983694896951324E-13
798
799
800npg ! The number of points in the Gauss-Legendre quadrature rule.
801+25
802call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
803integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
804[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
805+1.00000000000000000000000000000000000, +0.999999999999706095141248995594219719, +0.120306553279929482668493822643227188E-7, +0.999999999999706095141248995594219719, +0.393261349650593471228577134032766396, +0.293904858751004405780280951403881423E-12
806
807
808npg ! The number of points in the Gauss-Legendre quadrature rule.
809+26
810call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
811integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
812[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
813+1.00000000000000000000000000000000000, +0.999999999999952334389559838830294527, +0.119267743114816035866401210970178369E-7, +0.999999999999952334389559838830294527, +0.394042185417133795641544110033416363, +0.476656104401611697054725938206701912E-13
814
815
816npg ! The number of points in the Gauss-Legendre quadrature rule.
817+27
818call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
819integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
820[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
821+1.00000000000000000000000000000000000, +1.00000000000005476167859284022745736, +0.262814832178652855212328983486402886E-8, +1.00000000000005476167859284022745736, +0.394181687494669544116785805000454171, +0.547616785928402274573573724375388231E-13
822
823
824npg ! The number of points in the Gauss-Legendre quadrature rule.
825+28
826call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
827integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
828[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
829+1.00000000000000000000000000000000000, +1.00000000000001966585340307002760962, +0.309681232241307780486187483039603590E-9, +1.00000000000001966585340307002760962, +0.394342362078884011056471667915874251, +0.196658534030700276096208646655816420E-13
830
831
832npg ! The number of points in the Gauss-Legendre quadrature rule.
833+29
834call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
835integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
836[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
837+1.00000000000000000000000000000000000, +0.999999999999992730270368648178494284, +0.103748472594889243547498130742485954E-8, +0.999999999999992730270368648178494284, +0.395264354308561089073445263440686197, +0.726972963135182150571604047273134525E-14
838
839
840npg ! The number of points in the Gauss-Legendre quadrature rule.
841+30
842call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
843integral = getQuadGK(getNegExpPDF, ninf, 0._RK, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
844[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
845+1.00000000000000000000000000000000000, +0.999999999999994449741852009521042686, +0.480174162526454614389666304498635418E-9, +0.999999999999994449741852009521042686, +0.395627116110533594340013051876056480, +0.555025814799047895731430608410386828E-14
846
847
848!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
849!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
850! Gauss-Kronrod quadrature over a full infinite interval (-infinity, +infinity).
851!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
852!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
853
854
855!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
856! Compute the Gauss-Kronrod quadrature of the probability density function of the Normal distribution on the infinite range `(-infinity,+infinity)`.
857!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
858
859
860integral = getQuadGK(getNormPDF, ninf, pinf, GK15, abserr, intAbsFunc, smoothness)
861[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
862+1.00000000000000000000000000000000000, +1.00013399377821351070780951989074024, +0.520371760097297402596520759936154649, +1.00013399377821351070780951989074024, +0.520371760097297402596520759936154649, +0.133993778213510707809519890740236697E-3
863
864
865integral = getQuadGK(getNormPDF, ninf, pinf, GK21, abserr, intAbsFunc, smoothness)
866[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
867+1.00000000000000000000000000000000000, +1.00000006219858249076045525080772377, +0.180962319408893787958709117459958378, +1.00000006219858249076045525080772377, +0.534822723637914347593689635005556155, +0.621985824907604552508077237728630274E-7
868
869
870integral = getQuadGK(getNormPDF, ninf, pinf, GK41, abserr, intAbsFunc, smoothness)
871[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
872+1.00000000000000000000000000000000000, +1.00000000020775736565307480995767862, +0.324741782365031705351887839281157354E-4, +1.00000000020775736565307480995767862, +0.565688191895033301956544182737134208, +0.207757365653074809957678619429272725E-9
873
874
875integral = getQuadGK(getNormPDF, ninf, pinf, GK51, abserr, intAbsFunc, smoothness)
876[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
877+1.00000000000000000000000000000000000, +0.999999999998824790434966737064912939, +0.118665420978189588009761615662079279E-7, +0.999999999998824790434966737064912939, +0.571967544011505486292878007367671134, +0.117520956503326293508706082594566815E-11
878
879
880integral = getQuadGK(getNormPDF, ninf, pinf, GK61, abserr, intAbsFunc, smoothness)
881[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
882+1.00000000000000000000000000000000000, +1.00000000000000263764556073746559751, +0.209685705309904118724970666371149004E-7, +1.00000000000000263764556073746559751, +0.576169034187276677399923482103767254, +0.263764556073746559751241211794287719E-14
883
884
885!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
886! Compute the Gauss-Kronrod quadrature of the probability density function of the Normal distribution for non-default node counts.
887!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
888
889
890npg ! The number of points in the Gauss-Legendre quadrature rule.
891+1
892call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
893integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
894[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
895+1.00000000000000000000000000000000000, +0.503087114277400964682020247370777674, +0.524570367181801696654094967366249466, +0.503087114277400964682020247370777674, +0.524570367181801696654094967366249466, +0.496912885722599035317979752629222326
896
897
898npg ! The number of points in the Gauss-Legendre quadrature rule.
899+2
900call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
901integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
902[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
903+1.00000000000000000000000000000000000, +0.995260161125500564224716111249274335, +0.504631361366030402433242459388091406, +0.995260161125500564224716111249274335, +0.504631361366030402433242459388091406, +0.473983887449943577528388875072566484E-2
904
905
906npg ! The number of points in the Gauss-Legendre quadrature rule.
907+3
908call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
909integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
910[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
911+1.00000000000000000000000000000000000, +0.983402575799030450734487322864533994, +0.451854896760474450657646616800391765, +0.983402575799030450734487322864533994, +0.451854896760474450657646616800391765, +0.165974242009695492655126771354660057E-1
912
913
914npg ! The number of points in the Gauss-Legendre quadrature rule.
915+4
916call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
917integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
918[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
919+1.00000000000000000000000000000000000, +1.00363281774471587763295876442310553, +0.418625999989797601975791192844431673, +1.00363281774471587763295876442310553, +0.418625999989797601975791192844431673, +0.363281774471587763295876442310552663E-2
920
921
922npg ! The number of points in the Gauss-Legendre quadrature rule.
923+5
924call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
925integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
926[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
927+1.00000000000000000000000000000000000, +1.00012819685467266921996236813092467, +0.481527163677810122241045254918801411, +1.00012819685467266921996236813092467, +0.481527163677810122241045254918801411, +0.128196854672669219962368130924671270E-3
928
929
930npg ! The number of points in the Gauss-Legendre quadrature rule.
931+6
932call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
933integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
934[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
935+1.00000000000000000000000000000000000, +0.999664674655189386904838129632664130, +0.513087547335330382368953263265734043, +0.999664674655189386904838129632664130, +0.513087547335330382368953263265734043, +0.335325344810613095161870367335870337E-3
936
937
938npg ! The number of points in the Gauss-Legendre quadrature rule.
939+7
940call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
941integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
942[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
943+1.00000000000000000000000000000000000, +1.00013399377821351070780951989073947, +0.520371760097297402596520759936153878, +1.00013399377821351070780951989073947, +0.520371760097297402596520759936153878, +0.133993778213510707809519890739466325E-3
944
945
946npg ! The number of points in the Gauss-Legendre quadrature rule.
947+8
948call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
949integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
950[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
951+1.00000000000000000000000000000000000, +0.999964784304125683281557587469489799, +0.278511652578034356102989392537877059, +0.999964784304125683281557587469489799, +0.519312588338312924056313547181215086, +0.352156958743167184424125305102007235E-4
952
953
954npg ! The number of points in the Gauss-Legendre quadrature rule.
955+9
956call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
957integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
958[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
959+1.00000000000000000000000000000000000, +1.00000577905635232645807045348523296, +0.518794563140671897228445908722879831, +1.00000577905635232645807045348523296, +0.518794563140671897228445908722879831, +0.577905635232645807045348523296482171E-5
960
961
962npg ! The number of points in the Gauss-Legendre quadrature rule.
963+10
964call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
965integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
966[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
967+1.00000000000000000000000000000000000, +1.00000006219858249076045525080772358, +0.180962319408893787958709117459998678, +1.00000006219858249076045525080772358, +0.534822723637914347593689635005555770, +0.621985824907604552508077235802700330E-7
968
969
970npg ! The number of points in the Gauss-Legendre quadrature rule.
971+11
972call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
973integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
974[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
975+1.00000000000000000000000000000000000, +0.999999327821232789806453326349373199, +0.358127169660957811259528456051754792E-1, +0.999999327821232789806453326349373199, +0.543989728633852871381880771294391490, +0.672178767210193546673650626800684946E-6
976
977
978npg ! The number of points in the Gauss-Legendre quadrature rule.
979+12
980call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
981integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
982[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
983+1.00000000000000000000000000000000000, +1.00000037415908686166380790151170732, +0.561351700983428977532608103660063994E-1, +1.00000037415908686166380790151170732, +0.546207904756299516310079375388280184, +0.374159086861663807901511707318898279E-6
984
985
986npg ! The number of points in the Gauss-Legendre quadrature rule.
987+13
988call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
989integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
990[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
991+1.00000000000000000000000000000000000, +0.999999828362447837295340660556775296, +0.456824415829864007400215431671990670E-2, +0.999999828362447837295340660556775296, +0.545957373713019641010062161754507080, +0.171637552162704659339443224704449277E-6
992
993
994npg ! The number of points in the Gauss-Legendre quadrature rule.
995+14
996call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
997integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
998[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
999+1.00000000000000000000000000000000000, +1.00000006620096510930510524788862868, +0.669949142794900477856672892347498228E-2, +1.00000006620096510930510524788862868, +0.548706918232443639856422253034247008, +0.662009651093051052478886286841551314E-7
1000
1001
1002npg ! The number of points in the Gauss-Legendre quadrature rule.
1003+15
1004call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1005integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1006[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1007+1.00000000000000000000000000000000000, +0.999999975050422702215503678594673100, +0.319670691613500365030064395166112292E-2, +0.999999975050422702215503678594673100, +0.555297456113027714331266876311736656, +0.249495772977844963214053268995854370E-7
1008
1009
1010npg ! The number of points in the Gauss-Legendre quadrature rule.
1011+16
1012call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1013integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1014[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1015+1.00000000000000000000000000000000000, +1.00000000922966740645233793562934620, +0.256531209608671843677585731527417133E-3, +1.00000000922966740645233793562934620, +0.558797046345077257812587074741732966, +0.922966740645233793562934620017976080E-8
1016
1017
1018npg ! The number of points in the Gauss-Legendre quadrature rule.
1019+17
1020call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1021integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1022[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1023+1.00000000000000000000000000000000000, +0.999999996666649621800327338936416023, +0.764831669560125110245658336590058708E-3, +0.999999996666649621800327338936416023, +0.559418743952041336571900641306178958, +0.333335037819967266106358397674410671E-8
1024
1025
1026npg ! The number of points in the Gauss-Legendre quadrature rule.
1027+18
1028call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1029integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1030[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1031+1.00000000000000000000000000000000000, +1.00000000131950707800117755916563266, +0.390335345238328310948288874707952028E-4, +1.00000000131950707800117755916563266, +0.559052695849711554250539818915395726, +0.131950707800117755916563266028212431E-8
1032
1033
1034npg ! The number of points in the Gauss-Legendre quadrature rule.
1035+19
1036call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1037integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1038[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1039+1.00000000000000000000000000000000000, +0.999999999493978144034054028965233476, +0.122441983398503078983609908829094634E-3, +0.999999999493978144034054028965233476, +0.562223629697679675201557243640554497, +0.506021855965945971034766523828874008E-9
1040
1041
1042npg ! The number of points in the Gauss-Legendre quadrature rule.
1043+20
1044call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1045integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1046[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1047+1.00000000000000000000000000000000000, +1.00000000020775736565307480995767823, +0.324741782365031705351887839270013197E-4, +1.00000000020775736565307480995767823, +0.565688191895033301956544182737133630, +0.207757365653074809957678234243283848E-9
1048
1049
1050npg ! The number of points in the Gauss-Legendre quadrature rule.
1051+21
1052call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1053integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1054[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1055+1.00000000000000000000000000000000000, +0.999999999915803010106646820316268452, +0.143875990263337598139422792371285540E-4, +0.999999999915803010106646820316268452, +0.567218382450379802077679379935857523, +0.841969898933531796837315482846159490E-10
1056
1057
1058npg ! The number of points in the Gauss-Legendre quadrature rule.
1059+22
1060call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1061integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1062[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1063+1.00000000000000000000000000000000000, +1.00000000003133842483180617387152287, +0.104606825624316906055041288947595360E-4, +1.00000000003133842483180617387152287, +0.567478919014488525845325859402155714, +0.313384248318061738715228684899904789E-10
1064
1065
1066npg ! The number of points in the Gauss-Legendre quadrature rule.
1067+23
1068call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1069integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1070[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1071+1.00000000000000000000000000000000000, +0.999999999988174577992843535833176227, +0.109786629219594347057597263675616656E-5, +0.999999999988174577992843535833176227, +0.567055069659913372241048295613058960, +0.118254220071564641668237733641760898E-10
1072
1073
1074npg ! The number of points in the Gauss-Legendre quadrature rule.
1075+24
1076call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1077integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1078[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1079+1.00000000000000000000000000000000000, +1.00000000000379947926485840099138588, +0.253216909854759646179371441107085541E-5, +1.00000000000379947926485840099138588, +0.569986534794595445857809223439959865, +0.379947926485840099138587962432501407E-11
1080
1081
1082npg ! The number of points in the Gauss-Legendre quadrature rule.
1083+25
1084call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1085integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1086[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1087+1.00000000000000000000000000000000000, +0.999999999998824790434966737064913132, +0.118665420978189588009761616455888218E-7, +0.999999999998824790434966737064913132, +0.571967544011505486292878007367671519, +0.117520956503326293508686823295122943E-11
1088
1089
1090npg ! The number of points in the Gauss-Legendre quadrature rule.
1091+26
1092call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1093integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1094[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1095+1.00000000000000000000000000000000000, +1.00000000000040404111829123790128825, +0.537857975808993318379343690131806860E-6, +1.00000000000040404111829123790128825, +0.572632149406574183576242258140275927, +0.404041118291237901288248625395297757E-12
1096
1097
1098npg ! The number of points in the Gauss-Legendre quadrature rule.
1099+27
1100call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1101integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1102[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1103+1.00000000000000000000000000000000000, +0.999999999999873681513531431964782905, +0.208917040352045779339650879967384481E-7, +0.999999999999873681513531431964782905, +0.572725005273359248541222688803518465, +0.126318486468568035217094701749814141E-12
1104
1105
1106npg ! The number of points in the Gauss-Legendre quadrature rule.
1107+28
1108call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1109integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1110[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1111+1.00000000000000000000000000000000000, +1.00000000000005635012026323340455820, +0.107503647235369350542447674420438245E-6, +1.00000000000005635012026323340455820, +0.573194760304175322716213241298265510, +0.563501202632334045582042124986327163E-13
1112
1113
1114npg ! The number of points in the Gauss-Legendre quadrature rule.
1115+29
1116call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1117integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1118[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1119+1.00000000000000000000000000000000000, +0.999999999999978925607660794867616369, +0.122772101956508720058618178970216935E-7, +0.999999999999978925607660794867616369, +0.575071793136492911649582548204119421, +0.210743923392051323836310708615004565E-13
1120
1121
1122npg ! The number of points in the Gauss-Legendre quadrature rule.
1123+30
1124call setNodeWeightGK(nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2)) ! Compute the Gauss-Kronrod nodes and weights
1125integral = getQuadGK(getNormPDF, ninf, pinf, nodeK(1:npg+1), weightK(1:npg+1), weightG(1:(npg+1)/2), abserr, intAbsFunc, smoothness) ! Compute the (2*npg + 1)-points Gauss-Kronrod quadrature.
1126[truth, integral, abserr, intAbsFunc, smoothness, abs((integral - truth) / truth)]
1127+1.00000000000000000000000000000000000, +1.00000000000000263764556073746559693, +0.209685705309904118724970662541743439E-7, +1.00000000000000263764556073746559693, +0.576169034187276677399923482103766483, +0.263764556073746559693463313462670643E-14
1128
1129
Test:
test_pm_quadPack


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Amir Shahmoradi, Oct 16, 2009, 11:14 AM, Michigan

Definition at line 2272 of file pm_quadPack.F90.


The documentation for this interface was generated from the following file: