This is the indicator type for generating instances of objects that indicate the integration interval is open \((a, b)\) and, the intervals should be spaced assuming an integrand that behaves like,.
More...
This is the indicator type for generating instances of objects that indicate the integration interval is open \((a, b)\) and, the intervals should be spaced assuming an integrand that behaves like,.

a decreasing PowerLaw (PWL) on a positive support \((a > 0, b > 0)\), such that the upper limit of integration is allowed to be \(b = +\infty\), or

an increasing PowerLaw (PWL) on a negative support \((a < 0, b < 0)\), such that the lower limit of integration is allowed to be \(a = \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(pwrl_type) :: PWRL
This module contains classes and procedures to perform numerical integrations.
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 ⛓
14 real(SP) :: quad_SP, quadref_SP, relerr_SP, avg_SP, std_SP, logMinX_SP, alpha_SP
15 real(DP) :: quad_DP, quadref_DP, relerr_DP, avg_DP, std_DP, logMinX_DP, alpha_DP
16 real(QP) :: quad_QP, quadref_QP, relerr_QP, avg_QP, std_QP, logMinX_QP, alpha_QP
18 type(display_type) :: disp
22 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
23 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
24 call disp%show(
"! Compute the Cumulative Distribution Function (CDF) over the semiinfinite interval of Pareto distribution.")
25 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
26 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
30 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
31 call disp%show(
"! Compute the numerical integration with single precision.")
32 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
36 call disp%show(
"logMinX_SP = 3._SP; alpha_SP = 1._SP")
37 logMinX_SP
= 3._SP; alpha_SP
= 1._SP
38 call disp%show(
"quadref_SP = getParetoLogCDF(logx = log(huge(0._SP)), logMinX = logMinX_SP, alpha = alpha_SP)")
39 quadref_SP
= getParetoLogCDF(logx
= log(
huge(
0._SP)), logMinX
= logMinX_SP, alpha
= alpha_SP)
42 call disp%show(
"quad_SP = getQuadRomb(getFunc = getParetoPDF_SP, lb = logMinX_SP, ub = huge(0._SP), tol = epsilon(1._SP) * 100, nref = 4_IK, interval = pwrl_type(), relerr = relerr_SP, neval = neval)")
43 quad_SP
= getQuadRomb(getFunc
= getParetoPDF_SP, lb
= logMinX_SP, ub
= huge(
0._SP), tol
= epsilon(
1._SP)
* 100, nref
= 4_IK, interval
= pwrl_type(), relerr
= relerr_SP, neval
= neval)
44 call disp%show(
"if (relerr_SP < 0._SP) error stop 'Integration failed to converge.'")
45 if (relerr_SP
< 0._SP)
error stop 'Integration failed to converge.'
46 call disp%show(
"relerr_SP ! < 0. if integration fails.")
48 call disp%show(
"neval ! # calls to the integrand.")
55 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
56 call disp%show(
"! Compute the numerical integration with double precision.")
57 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
61 call disp%show(
"logMinX_DP = 3._DP; alpha_DP = 1._DP")
62 logMinX_DP
= 3._DP; alpha_DP
= 1._DP
63 call disp%show(
"quadref_DP = getParetoLogCDF(logx = log(huge(0._DP)), logMinX = logMinX_DP, alpha = alpha_DP)")
64 quadref_DP
= getParetoLogCDF(logx
= log(
huge(
0._DP)), logMinX
= logMinX_DP, alpha
= alpha_DP)
67 call disp%show(
"quad_DP = getQuadRomb(getFunc = getParetoPDF_DP, lb = logMinX_DP, ub = huge(0._DP), tol = epsilon(1._DP) * 100, nref = 7_IK, interval = pwrl_type(), relerr = relerr_DP, neval = neval)")
68 quad_DP
= getQuadRomb(getFunc
= getParetoPDF_DP, lb
= logMinX_DP, ub
= huge(
0._DP), tol
= epsilon(
1._DP)
* 100, nref
= 7_IK, interval
= pwrl_type(), relerr
= relerr_DP, neval
= neval)
69 call disp%show(
"if (relerr_DP < 0.) error stop 'Integration failed to converge.'")
70 if (relerr_DP
< 0.)
error stop 'Integration failed to converge.'
71 call disp%show(
"relerr_DP ! < 0. if integration fails.")
73 call disp%show(
"neval ! # calls to the integrand.")
80 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
81 call disp%show(
"! Compute the numerical integration with double precision.")
82 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
86 call disp%show(
"logMinX_QP = 1._QP; alpha_QP = 3._QP")
87 logMinX_QP
= 1._QP; alpha_QP
= 3._QP
88 call disp%show(
"quadref_QP = getParetoLogCDF(logx = log(huge(0._QP)), logMinX = logMinX_QP, alpha = alpha_QP)")
89 quadref_QP
= getParetoLogCDF(logx
= log(
huge(
0._QP)), logMinX
= logMinX_QP, alpha
= alpha_QP)
92 call disp%show(
"quad_QP = getQuadRomb(getFunc = getParetoPDF_QP, lb = logMinX_QP, ub = huge(0._QP), tol = epsilon(1._QP)*100, nref = 10_IK, interval = pwrl_type(), relerr = relerr_QP, neval = neval)")
93 quad_QP
= getQuadRomb(getFunc
= getParetoPDF_QP, lb
= logMinX_QP, ub
= huge(
0._QP), tol
= epsilon(
1._QP)
*100, nref
= 10_IK, interval
= pwrl_type(), relerr
= relerr_QP, neval
= neval)
94 call disp%show(
"if (relerr_QP < 0.) error stop 'Integration failed to converge.'")
95 if (relerr_QP
< 0.)
error stop 'Integration failed to converge.'
96 call disp%show(
"relerr_QP ! < 0. if integration fails.")
98 call disp%show(
"neval ! # calls to the integrand.")
100 call disp%show(
"quad_QP ! integral")
106 function getParetoPDF_SP(x)
result(expPDF)
107 real(SP),
intent(in) :: x
109 expPDF
= exp(
getParetoLogPDF(x, alpha
= alpha_SP, logMinX
= logMinX_SP))
112 function getParetoPDF_DP(x)
result(expPDF)
113 real(DP),
intent(in) :: x
115 expPDF
= exp(
getParetoLogPDF(x, alpha
= alpha_DP, logMinX
= logMinX_DP))
118 function getParetoPDF_QP(x)
result(expPDF)
119 real(QP),
intent(in) :: x
121 expPDF
= exp(
getParetoLogPDF(x, alpha
= alpha_QP, logMinX
= logMinX_QP))
124 function getNormPDF_SP(x)
result(expPDF)
125 real(SP),
intent(in) :: x
130 function getNormPDF_DP(x)
result(expPDF)
131 real(DP),
intent(in) :: x
136 function getNormPDF_QP(x)
result(expPDF)
137 real(QP),
intent(in) :: x
Generate the natural logarithm of probability density function (PDF) of the univariate Normal distrib...
Generate and return the natural logarithm of the Cumulative Distribution Function (CDF) of the (Trunc...
Generate and return the natural logarithm of the Probability Density Function (PDF) of the (Truncated...
This is a generic method of the derived type display_type with pass attribute.
This is a generic method of the derived type display_type with pass attribute.
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...
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...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind typeparameters frequently used in the ParaMonte librar...
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in CFortran Interoper...
integer, parameter RKD
The double precision real kind in Fortran mode. On most platforms, this is an 64bit real kind.
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in CFortran Intero...
integer, parameter RKH
The scalar integer constant of intrinsic default kind, representing the highestprecision real kind t...
integer, parameter RKS
The singleprecision real kind in Fortran mode. On most platforms, this is an 32bit real kind.
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort fpp standardsemantics O3 Wl,rpath,../../../lib I../../../inc main.F90 ../../../lib/libparamonte* o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standardsemantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran cpp ffreelinelengthnone O3 Wl,rpath,../../../lib I../../../inc main.F90 ../../../lib/libparamonte* o main.exe
Example output ⛓
14logMinX_SP
= 3._SP; alpha_SP
= 1._SP
15quadref_SP
= getParetoLogCDF(logx
= log(
huge(
0._SP)), logMinX
= logMinX_SP, alpha
= alpha_SP)
18quad_SP
= getQuadRomb(getFunc
= getParetoPDF_SP, lb
= logMinX_SP, ub
= huge(
0._SP), tol
= epsilon(
1._SP)
* 100, nref
= 4_IK, interval
= pwrl_type(), relerr
= relerr_SP, neval
= neval)
19if (relerr_SP
< 0._SP)
error stop 'Integration failed to converge.'
33logMinX_DP
= 3._DP; alpha_DP
= 1._DP
34quadref_DP
= getParetoLogCDF(logx
= log(
huge(
0._DP)), logMinX
= logMinX_DP, alpha
= alpha_DP)
37quad_DP
= getQuadRomb(getFunc
= getParetoPDF_DP, lb
= logMinX_DP, ub
= huge(
0._DP), tol
= epsilon(
1._DP)
* 100, nref
= 7_IK, interval
= pwrl_type(), relerr
= relerr_DP, neval
= neval)
38if (relerr_DP
< 0.)
error stop 'Integration failed to converge.'
40+0.15800940639871217E19
44+0.24893534183931615E1
52logMinX_QP
= 1._QP; alpha_QP
= 3._QP
53quadref_QP
= getParetoLogCDF(logx
= log(
huge(
0._QP)), logMinX
= logMinX_QP, alpha
= alpha_QP)
55+0.00000000000000000000000000000000000
56quad_QP
= getQuadRomb(getFunc
= getParetoPDF_QP, lb
= logMinX_QP, ub
= huge(
0._QP), tol
= epsilon(
1._QP)
*100, nref
= 10_IK, interval
= pwrl_type(), relerr
= relerr_QP, neval
= neval)
57if (relerr_QP
< 0.)
error stop 'Integration failed to converge.'
59+0.180961348322211011195384953574198665E35
63+0.275909580878581741196642827620996662
 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.

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.

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.
 Copyright
 Computational Data Science Lab
 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 125 of file pm_quadRomb.F90.