ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_quadRomb::nexp_type Type Reference

This is the indicator type for generating instances of objects that indicate the integration interval is open and, the intervals should be spaced assuming an integrand that behaves like a Negative-Exponent Exponential (NEXP), such that the upper limit of integration is allowed to be \(b = +\infty\). More...

Detailed Description

This is the indicator type for generating instances of objects that indicate the integration interval is open and, the intervals should be spaced assuming an integrand that behaves like a Negative-Exponent Exponential (NEXP), such that the upper limit of integration is allowed to be \(b = +\infty\).

This is an empty derived type that exists solely for generating unique objects that are distinguishable as input arguments to procedures under the generic interface getQuadRomb.


Possible calling interfaces

type(nexp_type) :: NEXP
This module contains classes and procedures to perform numerical integrations.
Definition: pm_quadRomb.F90:31
This is the indicator type for generating instances of objects that indicate the integration interval...
See also
lbis_type
nexp_type
open_type
pexp_type
pwrl_type
ubis_type
getQuadRomb


Example usage

1program example
2
3 use pm_kind, only: SK, IK, SP => RKS, DP => RKD, QP => RKH ! all real kinds are supported.
5 use pm_distExp, only: getExpCDF
6 use pm_distExp, only: getExpLogPDF
9 use pm_io, only: display_type
10
11 implicit none
12
13 integer(IK) :: neval
14
15 real(SP) :: quad_SP, quadref_SP, relerr_SP, kappa_SP, invSigma_SP
16 real(DP) :: quad_DP, quadref_DP, relerr_DP, kappa_DP, invSigma_DP
17 real(QP) :: quad_QP, quadref_QP, relerr_QP, kappa_QP, invSigma_QP
18
19 type(display_type) :: disp
20 disp = display_type(file = "main.out.F90")
21
22 call disp%skip()
23 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
24 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
25 call disp%show("! Compute the Cumulative Distribution Function (CDF) over the semi-infinite interval of Exponential distribution.")
26 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
27 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
28 call disp%skip()
29
30 call disp%skip()
31 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
32 call disp%show("! Compute the numerical integration with single precision.")
33 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
34 call disp%skip()
35
36 call disp%skip()
37 call disp%show("invSigma_SP = 3._SP")
38 invSigma_SP = 3._SP
39 call disp%show("quadref_SP = getExpCDF(x = log(huge(0._SP)), invSigma = invSigma_SP)")
40 quadref_SP = getExpCDF(x = log(huge(0._SP)), invSigma = invSigma_SP)
41 call disp%show("quadref_SP")
42 call disp%show( quadref_SP )
43 call disp%show("quad_SP = getQuadRomb(getFunc = getExpPDF_SP, lb = 0._SP, ub = huge(0._SP), tol = epsilon(1._SP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_SP, neval = neval)")
44 quad_SP = getQuadRomb(getFunc = getExpPDF_SP, lb = 0._SP, ub = huge(0._SP), tol = epsilon(1._SP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_SP, neval = neval)
45 call disp%show("if (relerr_SP < 0._SP) error stop 'Integration failed to converge.'")
46 if (relerr_SP < 0._SP) error stop 'Integration failed to converge.'
47 call disp%show("relerr_SP ! < 0. if integration fails.")
48 call disp%show( relerr_SP )
49 call disp%show("neval ! # calls to the integrand.")
50 call disp%show( neval )
51 call disp%show("quad_SP ! integral")
52 call disp%show( quad_SP )
53 call disp%skip()
54
55 call disp%skip()
56 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
57 call disp%show("! Compute the numerical integration with double precision.")
58 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
59 call disp%skip()
60
61 call disp%skip()
62 call disp%show("invSigma_DP = 3._DP")
63 invSigma_DP = 3._DP
64 call disp%show("quadref_DP = getExpCDF(x = log(huge(0._DP)), invSigma = invSigma_DP)")
65 quadref_DP = getExpCDF(x = log(huge(0._DP)), invSigma = invSigma_DP)
66 call disp%show("quadref_DP")
67 call disp%show( quadref_DP )
68 call disp%show("quad_DP = getQuadRomb(getFunc = getExpPDF_DP, lb = 0._DP, ub = huge(0._DP), tol = epsilon(1._DP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_DP, neval = neval)")
69 quad_DP = getQuadRomb(getFunc = getExpPDF_DP, lb = 0._DP, ub = huge(0._DP), tol = epsilon(1._DP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_DP, neval = neval)
70 call disp%show("if (relerr_DP < 0.) error stop 'Integration failed to converge.'")
71 if (relerr_DP < 0.) error stop 'Integration failed to converge.'
72 call disp%show("relerr_DP ! < 0. if integration fails.")
73 call disp%show( relerr_DP )
74 call disp%show("neval ! # calls to the integrand.")
75 call disp%show( neval )
76 call disp%show("quad_DP ! integral")
77 call disp%show( quad_DP )
78 call disp%skip()
79
80 call disp%skip()
81 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
82 call disp%show("! Compute the numerical integration with double precision.")
83 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
84 call disp%skip()
85
86 call disp%skip()
87 call disp%show("invSigma_QP = 3._QP")
88 invSigma_QP = 3._QP
89 call disp%show("quadref_QP = getExpCDF(x = log(huge(0._QP)), invSigma = invSigma_QP)")
90 quadref_QP = getExpCDF(x = log(huge(0._QP)), invSigma = invSigma_QP)
91 call disp%show("quadref_QP")
92 call disp%show( quadref_QP )
93 call disp%show("quad_QP = getQuadRomb(getFunc = getExpPDF_QP, lb = 0._QP, ub = huge(0._QP), tol = epsilon(1._QP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_QP, neval = neval)")
94 quad_QP = getQuadRomb(getFunc = getExpPDF_QP, lb = 0._QP, ub = huge(0._QP), tol = epsilon(1._QP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_QP, neval = neval)
95 call disp%show("if (relerr_QP < 0.) error stop 'Integration failed to converge.'")
96 if (relerr_QP < 0.) error stop 'Integration failed to converge.'
97 call disp%show("relerr_QP ! < 0. if integration fails.")
98 call disp%show( relerr_QP )
99 call disp%show("neval ! # calls to the integrand.")
100 call disp%show( neval )
101 call disp%show("quad_QP ! integral")
102 call disp%show( quad_QP )
103 call disp%skip()
104
105 call disp%skip()
106 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
107 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
108 call disp%show("! Compute the Cumulative Distribution Function (CDF) over the semi-infinite interval of Gamma distribution whose tail decays exponentially.")
109 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
110 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
111 call disp%skip()
112
113 call disp%skip()
114 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
115 call disp%show("! Compute the numerical integration with single precision.")
116 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
117 call disp%skip()
118
119 call disp%skip()
120 call disp%show("kappa_SP = 2._SP")
121 kappa_SP = 2._SP
122 call disp%show("invSigma_SP = 2._SP")
123 invSigma_SP = 2._SP
124 call disp%show("quadref_SP = getGammaIncLow(log(huge(0._SP)), kappa = kappa_SP) - getGammaIncLow(0._SP, kappa = kappa_SP)")
125 quadref_SP = getGammaIncLow(log(huge(0._SP)), kappa = kappa_SP) - getGammaIncLow(0._SP, kappa = kappa_SP)
126 call disp%show("quadref_SP")
127 call disp%show( quadref_SP )
128 call disp%show("quad_SP = getQuadRomb(getFunc = getGammaPDF_SP, lb = 0._SP, ub = huge(0._SP), tol = epsilon(1._SP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_SP, neval = neval)")
129 quad_SP = getQuadRomb(getFunc = getGammaPDF_SP, lb = 0._SP, ub = huge(0._SP), tol = epsilon(1._SP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_SP, neval = neval)
130 call disp%show("if (relerr_SP < 0._SP) error stop 'Integration failed to converge.'")
131 if (relerr_SP < 0._SP) error stop 'Integration failed to converge.'
132 call disp%show("relerr_SP ! < 0. if integration fails.")
133 call disp%show( relerr_SP )
134 call disp%show("neval ! # calls to the integrand.")
135 call disp%show( neval )
136 call disp%show("quad_SP ! integral")
137 call disp%show( quad_SP )
138 call disp%skip()
139
140 call disp%skip()
141 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
142 call disp%show("! Compute the numerical integration with double precision.")
143 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
144 call disp%skip()
145
146 call disp%skip()
147 call disp%show("kappa_DP = 2._DP")
148 kappa_DP = 2._DP
149 call disp%show("invSigma_DP = 2._DP")
150 invSigma_DP = 2._DP
151 call disp%show("quadref_DP = getGammaIncLow(log(huge(0._DP)), kappa = kappa_DP) - getGammaIncLow(0._DP, kappa = kappa_DP)")
152 quadref_DP = getGammaIncLow(log(huge(0._DP)), kappa = kappa_DP) - getGammaIncLow(0._DP, kappa = kappa_DP)
153 call disp%show("quadref_DP")
154 call disp%show( quadref_DP )
155 call disp%show("quad_DP = getQuadRomb(getFunc = getGammaPDF_DP, lb = 0._DP, ub = huge(0._DP), tol = epsilon(1._DP) * 100, nref = 7_IK, interval = nexp_type(), relerr = relerr_DP, neval = neval)")
156 quad_DP = getQuadRomb(getFunc = getGammaPDF_DP, lb = 0._DP, ub = huge(0._DP), tol = epsilon(1._DP) * 100, nref = 7_IK, interval = nexp_type(), relerr = relerr_DP, neval = neval)
157 call disp%show("if (relerr_DP < 0._DP) error stop 'Integration failed to converge.'")
158 if (relerr_DP < 0._DP) error stop 'Integration failed to converge.'
159 call disp%show("relerr_DP ! < 0. if integration fails.")
160 call disp%show( relerr_DP )
161 call disp%show("neval ! # calls to the integrand.")
162 call disp%show( neval )
163 call disp%show("quad_DP ! integral")
164 call disp%show( quad_DP )
165 call disp%skip()
166
167 call disp%skip()
168 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
169 call disp%show("! Compute the numerical integration with quadro precision.")
170 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
171 call disp%skip()
172
173 call disp%skip()
174 call disp%show("kappa_QP = 2._QP")
175 kappa_QP = 2._QP
176 call disp%show("invSigma_QP = 2._QP")
177 invSigma_QP = 2._QP
178 call disp%show("quadref_QP = getGammaIncLow(log(huge(0._QP)), kappa = kappa_QP) - getGammaIncLow(0._QP, kappa = kappa_QP)")
179 quadref_QP = getGammaIncLow(log(huge(0._QP)), kappa = kappa_QP) - getGammaIncLow(0._QP, kappa = kappa_QP)
180 call disp%show("quadref_QP")
181 call disp%show( quadref_QP )
182 call disp%show("quad_QP = getQuadRomb(getFunc = getGammaPDF_QP, lb = 0._QP, ub = huge(0._QP), tol = sqrt(epsilon(1._QP)), nref = 10_IK, interval = nexp_type(), relerr = relerr_QP, neval = neval)")
183 quad_QP = getQuadRomb(getFunc = getGammaPDF_QP, lb = 0._QP, ub = huge(0._QP), tol = sqrt(epsilon(1._QP)), nref = 10_IK, interval = nexp_type(), relerr = relerr_QP, neval = neval)
184 call disp%show("if (relerr_QP < 0._QP) error stop 'Integration failed to converge.'")
185 if (relerr_QP < 0._QP) error stop 'Integration failed to converge.'
186 call disp%show("relerr_QP ! < 0. if integration fails.")
187 call disp%show( relerr_QP )
188 call disp%show("neval ! # calls to the integrand.")
189 call disp%show( neval )
190 call disp%show("quad_QP ! integral")
191 call disp%show( quad_QP )
192 call disp%skip()
193
194contains
195
196 function getExpPDF_SP(x) result(expPDF)
197 real(SP), intent(in) :: x
198 real(SP) :: expPDF
199 expPDF = exp(getExpLogPDF(x, invSigma = invSigma_SP))
200 end function
201
202 function getExpPDF_DP(x) result(expPDF)
203 real(DP), intent(in) :: x
204 real(DP) :: expPDF
205 expPDF = exp(getExpLogPDF(x, invSigma = invSigma_DP))
206 end function
207
208 function getExpPDF_QP(x) result(expPDF)
209 real(QP), intent(in) :: x
210 real(QP) :: expPDF
211 expPDF = exp(getExpLogPDF(x, invSigma = invSigma_QP))
212 end function
213
214 function getGammaPDF_SP(x) result(gammaPDF)
215 real(SP), intent(in) :: x
216 real(SP) :: gammaPDF
217 gammaPDF = exp(getGammaLogPDF(x, kappa = kappa_SP, invSigma = invSigma_SP))
218 end function
219
220 function getGammaPDF_DP(x) result(gammaPDF)
221 real(DP), intent(in) :: x
222 real(DP) :: gammaPDF
223 gammaPDF = exp(getGammaLogPDF(x, kappa = kappa_DP, invSigma = invSigma_DP))
224 end function
225
226 function getGammaPDF_QP(x) result(gammaPDF)
227 real(QP), intent(in) :: x
228 real(QP) :: gammaPDF
229 gammaPDF = exp(getGammaLogPDF(x, kappa = kappa_QP, invSigma = invSigma_QP))
230 end function
231
232end program example
Generate and return the Cumulative Distribution Function (CDF) of the Exponential distribution for an...
Definition: pm_distExp.F90:655
Generate and return the natural logarithm of the Probability Density Function (PDF) of the Exponentia...
Definition: pm_distExp.F90:221
Generate and return the natural logarithm of the Probability Density Function (PDF) of the Gamma dist...
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
Generate and return the regularized Lower Incomplete Gamma function for the specified shape parameter...
Generate and return the integral of the input function getFunc() in the closed range [lb,...
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 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
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
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 RKD
The double precision real kind in Fortran mode. On most platforms, this is an 64-bit real kind.
Definition: pm_kind.F90:568
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
integer, parameter RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
Definition: pm_kind.F90:567
This module contains procedures and generic interfaces for the Lower and Upper Incomplete Gamma funct...
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! Compute the Cumulative Distribution Function (CDF) over the semi-infinite interval of Exponential distribution.
5!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7
8
9!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
10! Compute the numerical integration with single precision.
11!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12
13
14invSigma_SP = 3._SP
15quadref_SP = getExpCDF(x = log(huge(0._SP)), invSigma = invSigma_SP)
16quadref_SP
17+1.00000000
18quad_SP = getQuadRomb(getFunc = getExpPDF_SP, lb = 0._SP, ub = huge(0._SP), tol = epsilon(1._SP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_SP, neval = neval)
19if (relerr_SP < 0._SP) error stop 'Integration failed to converge.'
20relerr_SP ! < 0. if integration fails.
21+0.407197748E-9
22neval ! # calls to the integrand.
23+27
24quad_SP ! integral
25+0.999999940
26
27
28!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
29! Compute the numerical integration with double precision.
30!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
31
32
33invSigma_DP = 3._DP
34quadref_DP = getExpCDF(x = log(huge(0._DP)), invSigma = invSigma_DP)
35quadref_DP
36+1.0000000000000000
37quad_DP = getQuadRomb(getFunc = getExpPDF_DP, lb = 0._DP, ub = huge(0._DP), tol = epsilon(1._DP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_DP, neval = neval)
38if (relerr_DP < 0.) error stop 'Integration failed to converge.'
39relerr_DP ! < 0. if integration fails.
40+0.15679231417482677E-18
41neval ! # calls to the integrand.
42+27
43quad_DP ! integral
44+1.0000000000000000
45
46
47!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48! Compute the numerical integration with double precision.
49!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50
51
52invSigma_QP = 3._QP
53quadref_QP = getExpCDF(x = log(huge(0._QP)), invSigma = invSigma_QP)
54quadref_QP
55+1.00000000000000000000000000000000000
56quad_QP = getQuadRomb(getFunc = getExpPDF_QP, lb = 0._QP, ub = huge(0._QP), tol = epsilon(1._QP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_QP, neval = neval)
57if (relerr_QP < 0.) error stop 'Integration failed to converge.'
58relerr_QP ! < 0. if integration fails.
59+0.100451159285899950138381146936573719E-35
60neval ! # calls to the integrand.
61+27
62quad_QP ! integral
63+0.999999999999999999999999999999999422
64
65
66!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
68! Compute the Cumulative Distribution Function (CDF) over the semi-infinite interval of Gamma distribution whose tail decays exponentially.
69!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
70!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71
72
73!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
74! Compute the numerical integration with single precision.
75!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
76
77
78kappa_SP = 2._SP
79invSigma_SP = 2._SP
80quadref_SP = getGammaIncLow(log(huge(0._SP)), kappa = kappa_SP) - getGammaIncLow(0._SP, kappa = kappa_SP)
81quadref_SP
82+1.00000000
83quad_SP = getQuadRomb(getFunc = getGammaPDF_SP, lb = 0._SP, ub = huge(0._SP), tol = epsilon(1._SP) * 100, nref = 4_IK, interval = nexp_type(), relerr = relerr_SP, neval = neval)
84if (relerr_SP < 0._SP) error stop 'Integration failed to converge.'
85relerr_SP ! < 0. if integration fails.
86+0.279331175E-5
87neval ! # calls to the integrand.
88+27
89quad_SP ! integral
90+1.00025165
91
92
93!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
94! Compute the numerical integration with double precision.
95!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
96
97
98kappa_DP = 2._DP
99invSigma_DP = 2._DP
100quadref_DP = getGammaIncLow(log(huge(0._DP)), kappa = kappa_DP) - getGammaIncLow(0._DP, kappa = kappa_DP)
101quadref_DP
102+1.0000000000000000
103quad_DP = getQuadRomb(getFunc = getGammaPDF_DP, lb = 0._DP, ub = huge(0._DP), tol = epsilon(1._DP) * 100, nref = 7_IK, interval = nexp_type(), relerr = relerr_DP, neval = neval)
104if (relerr_DP < 0._DP) error stop 'Integration failed to converge.'
105relerr_DP ! < 0. if integration fails.
106+0.71143903588068092E-14
107neval ! # calls to the integrand.
108+19683
109quad_DP ! integral
110+1.0000000004727598
111
112
113!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
114! Compute the numerical integration with quadro precision.
115!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
116
117
118kappa_QP = 2._QP
119invSigma_QP = 2._QP
120quadref_QP = getGammaIncLow(log(huge(0._QP)), kappa = kappa_QP) - getGammaIncLow(0._QP, kappa = kappa_QP)
121quadref_QP
122+1.00000000000000000000000000000000000
123quad_QP = getQuadRomb(getFunc = getGammaPDF_QP, lb = 0._QP, ub = huge(0._QP), tol = sqrt(epsilon(1._QP)), nref = 10_IK, interval = nexp_type(), relerr = relerr_QP, neval = neval)
124if (relerr_QP < 0._QP) error stop 'Integration failed to converge.'
125relerr_QP ! < 0. if integration fails.
126+0.975928566535230134937169834879257738E-17
127neval ! # calls to the integrand.
128+19683
129quad_QP ! integral
130+1.00000000047261839211598849473494003
131
132
Test:
test_pm_quadRomb


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, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas at Austin

Definition at line 169 of file pm_quadRomb.F90.


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