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

Return the regularized Lower and Upper Incomplete Gamma function values for the specified shape parameter ( \(\kappa\)) and upper limit of the integral x.
More...

Detailed Description

Return the regularized Lower and Upper Incomplete Gamma function values for the specified shape parameter ( \(\kappa\)) and upper limit of the integral x.

The regularized Lower Incomplete Gamma function is defined as,

\begin{equation} \large P(\kappa, x) = \frac{1}{\Gamma(\kappa)} \int_0^x~t^{\kappa-1}{\mathrm e}^{-t} ~ dt ~, \end{equation}

where \((\kappa > 0, x > 0)\) should hold, with \(\kappa\) representing the shape parameter of the Gamma function (or distribution) and \(x\) representing the upper limit in the integral of the Lower Incomplete Gamma function.
The Regularized Upper Incomplete Gamma Function can be readily obtained as,

\begin{equation} \large Q(\kappa, x) = 1 - P(\kappa, x) ~, \end{equation}

However, the sake of numerical accuracy of either integral near 1, both lower and upper incomplete gamma values are returned by the procedures of this generic interface.

Note that this integral is bounded between zero and one ( \([0,1]\)).
The regularized Lower Incomplete Gamma function also represents the Cumulative Distribution Function (CDF) of the univariate Gamma distribution with the specified shape parameter and standardized x (with the scale parameter of unity).

Parameters
[out]gammaIncLow: The output scalar of the same type and kind as the input argument x representing the Incomplete Gamma function for the specified kappa and lower limit.
Note that gammaIncLow is, by definition, always positive in the range \([0, 1]\).
[out]gammaIncUpp: The output scalar of the same type and kind as the input argument x representing the Upper Incomplete Gamma function for the specified kappa and lower limit.
Note that gammaIncUpp is, by definition, always positive in the range \([0, 1]\).
[in]x: The input scalar of the type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128), representing the upper limit in the integral of the Incomplete Gamma function \(P(\kappa,x)\).
[in]kappa: The input scalar of the same type and kind as x, representing the shape parameter ( \(\kappa\)) of the Incomplete Gamma function \(P(\kappa,x)\).
[out]info: The input scalar or array of the same shape as other input arguments of type integer of default kind IK.
On output, it is set to zero if the algorithm succeeds to converge or a negative value if the algorithm fails to converge.
A convergence failure could happen if the input value for kappa is too large.
A negative value implies the lack of convergence.


Possible calling interfaces

call setGammaIncGil(gammaIncLow, gammaIncUpp, x, kappa, info)
Return the regularized Lower and Upper Incomplete Gamma function values for the specified shape param...
This module contains procedures and generic interfaces for the Lower and Upper Incomplete Gamma funct...
Warning
The condition 0 < x must hold for the corresponding input arguments.
The condition 0 < kappa must hold for the corresponding input arguments.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1.
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
Remarks
The procedures under discussion are elemental.
See also
getGammaIncLowGil
setGammaIncGil


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK
4 use pm_kind, only: RKS, RKD, RKH
6 use pm_io, only: display_type
7
8 implicit none
9
10 integer(IK) , parameter :: NP = 1000_IK
11 real(RKH) :: gamIncLow_RKH, gamIncUpp_RKH, x_RKH, kappa_RKH
12 real(RKD) :: gamIncLow_RKD, gamIncUpp_RKD, x_RKD, kappa_RKD
13 real(RKS) :: gamIncLow_RKS, gamIncUpp_RKS, x_RKS, kappa_RKS
14 integer(IK) :: info
15
16 type(display_type) :: disp
17 disp = display_type(file = "main.out.F90")
18
19 kappa_RKH = 1.5_RKH
20 kappa_RKD = 1.5_RKD
21 kappa_RKS = 1.5_RKS
22
23 x_RKH = 2._RKH
24 x_RKD = 2._RKD
25 x_RKS = 2._RKS
26
27 call disp%skip()
28 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
29 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
30 call disp%show("! Compute the regularized Lower Incomplete Gamma Function using its series representation.")
31 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
32 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
33 call disp%skip()
34
35 call disp%skip()
36 call disp%show("x_RKS")
37 call disp%show( x_RKS )
38 call disp%show("kappa_RKS")
39 call disp%show( kappa_RKS )
40 call disp%show("call setGammaIncGil(gamIncLow_RKS, gamIncUpp_RKS, x_RKS, kappa = kappa_RKS, info = info)")
41 call setGammaIncGil(gamIncLow_RKS, gamIncUpp_RKS, x_RKS, kappa = kappa_RKS, info = info)
42 call disp%show("[gamIncLow_RKS, gamIncUpp_RKS]")
43 call disp%show( [gamIncLow_RKS, gamIncUpp_RKS] )
44 call disp%show("info")
45 call disp%show( info )
46 call disp%skip()
47
48 call disp%skip()
49 call disp%show("x_RKD")
50 call disp%show( x_RKD )
51 call disp%show("kappa_RKD")
52 call disp%show( kappa_RKD )
53 call disp%show("call setGammaIncGil(gamIncLow_RKD, gamIncUpp_RKD, x_RKD, kappa = kappa_RKD, info = info)")
54 call setGammaIncGil(gamIncLow_RKD, gamIncUpp_RKD, x_RKD, kappa = kappa_RKD, info = info)
55 call disp%show("[gamIncLow_RKD, gamIncUpp_RKD]")
56 call disp%show( [gamIncLow_RKD, gamIncUpp_RKD] )
57 call disp%show("info")
58 call disp%show( info )
59 call disp%skip()
60
61 call disp%skip()
62 call disp%show("x_RKH")
63 call disp%show( x_RKH )
64 call disp%show("kappa_RKH")
65 call disp%show( kappa_RKH )
66 call disp%show("call setGammaIncGil(gamIncLow_RKH, gamIncUpp_RKH, x_RKH, kappa = kappa_RKH, info = info)")
67 call setGammaIncGil(gamIncLow_RKH, gamIncUpp_RKH, x_RKH, kappa = kappa_RKH, info = info)
68 call disp%show("[gamIncLow_RKH, gamIncUpp_RKH]")
69 call disp%show( [gamIncLow_RKH, gamIncUpp_RKH] )
70 call disp%show("info")
71 call disp%show( info )
72 call disp%skip()
73
74 call disp%skip()
75 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
76 call disp%show("! Compute the regularized Lower Incomplete Gamma Function for a vector of points and shape parameters.")
77 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
78 call disp%skip()
79
80 block
81 use pm_kind, only: RKG => RKD
82 integer(IK) :: i, rprecision
83 integer(IK), allocatable :: exprange(:), info(:)
84 real(RKG), allocatable :: gamIncLow(:), gamIncUpp(:)
85 call disp%skip()
86 call disp%show("rprecision = precision(0._RKG) * 2")
87 rprecision = precision(0._RKG) * 2
88 call disp%show("rprecision")
89 call disp%show( rprecision )
90 call disp%show("exprange = [(i, i = -rprecision, rprecision)]")
91 exprange = [(i, i = -rprecision, rprecision)]
92 call disp%show("exprange")
93 call disp%show( exprange )
94 call disp%show("allocate(gamIncLow(size(exprange)), gamIncUpp(size(exprange)), info(size(exprange)))")
95 allocate(gamIncLow(size(exprange)), gamIncUpp(size(exprange)), info(size(exprange)))
96 call disp%show("call setGammaIncGil(gamIncLow, gamIncUpp, x = 10._RKG**exprange, kappa = 10._RKG**exprange, info = info)")
97 call setGammaIncGil(gamIncLow, gamIncUpp, x = 10._RKG**exprange, kappa = 10._RKG**exprange, info = info)
98 call disp%show("reshape([10._RKG**exprange, gamIncLow, real(info, RKG)], shape = [size(info), 3])")
99 call disp%show( reshape([10._RKG**exprange, gamIncLow, real(info, RKG)], shape = [size(info), 3]) )
100 call disp%skip()
101 end block
102
103 block
104 use pm_kind, only: RKG => RKH
105 integer(IK) :: i, rprecision
106 integer(IK), allocatable :: exprange(:), info(:)
107 real(RKG), allocatable :: gamIncLow(:), gamIncUpp(:)
108 call disp%skip()
109 call disp%show("rprecision = precision(0._RKG) * 2")
110 rprecision = precision(0._RKG) * 2
111 call disp%show("rprecision")
112 call disp%show( rprecision )
113 call disp%show("exprange = [(i, i = -rprecision, rprecision)]")
114 exprange = [(i, i = -rprecision, rprecision)]
115 call disp%show("exprange")
116 call disp%show( exprange )
117 call disp%show("allocate(gamIncLow(size(exprange)), gamIncUpp(size(exprange)), info(size(exprange)))")
118 allocate(gamIncLow(size(exprange)), gamIncUpp(size(exprange)), info(size(exprange)))
119 call disp%show("call setGammaIncGil(gamIncLow, gamIncUpp, x = 10._RKG**exprange, kappa = 10._RKG**exprange, info = info)")
120 call setGammaIncGil(gamIncLow, gamIncUpp, x = 10._RKG**exprange, kappa = 10._RKG**exprange, info = info)
121 call disp%show("reshape([10._RKG**exprange, gamIncLow, real(info, RKG)], shape = [size(info), 3])")
122 call disp%show( reshape([10._RKG**exprange, gamIncLow, real(info, RKG)], shape = [size(info), 3]) )
123 call disp%skip()
124 end block
125
126 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
127 ! Output an example array of the regularized Lower Incomplete Gamma function for visualization.
128 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
129
130 block
131
132 use pm_arraySpace, only: setLinSpace
133 real(RKS) :: x_RKS(NP)
134 integer :: fileUnit, i
135
136 call setLinSpace(x_RKS, 0._RKS, 8._RKS)
137 open(newunit = fileUnit, file = "setGammaIncGil.RK.txt")
138 do i = 1, NP
139 call setGammaIncGil(gamIncLow_RKS, gamIncUpp_RKS, x_RKS(i), kappa = kappa_RKS, info = info)
140 write(fileUnit,"(2(g0,:,' '))") x_RKS(i), gamIncLow_RKS
141 end do
142 close(fileUnit)
143
144 end block
145
146end program example
Return the linSpace output argument with size(linSpace) elements of evenly-spaced values over the int...
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
This module contains procedures and generic interfaces for generating arrays with linear or logarithm...
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 LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
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
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 regularized Lower Incomplete Gamma Function using its series representation.
5!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7
8
9x_RKS
10+2.00000000
11kappa_RKS
12+1.50000000
13call setGammaIncGil(gamIncLow_RKS, gamIncUpp_RKS, x_RKS, kappa = kappa_RKS, info = info)
14[gamIncLow_RKS, gamIncUpp_RKS]
15+0.738535821, +0.261464179
16info
17+0
18
19
20x_RKD
21+2.0000000000000000
22kappa_RKD
23+1.5000000000000000
24call setGammaIncGil(gamIncLow_RKD, gamIncUpp_RKD, x_RKD, kappa = kappa_RKD, info = info)
25[gamIncLow_RKD, gamIncUpp_RKD]
26+0.73853587005088861, +0.26146412994911145
27info
28+0
29
30
31x_RKH
32+2.00000000000000000000000000000000000
33kappa_RKH
34+1.50000000000000000000000000000000000
35call setGammaIncGil(gamIncLow_RKH, gamIncUpp_RKH, x_RKH, kappa = kappa_RKH, info = info)
36[gamIncLow_RKH, gamIncUpp_RKH]
37+0.738535870050889377797177924024077018, +0.261464129949110622202822075975923030
38info
39+0
40
41
42!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43! Compute the regularized Lower Incomplete Gamma Function for a vector of points and shape parameters.
44!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
45
46
47rprecision = precision(0._RKG) * 2
48rprecision
49+30
50exprange = [(i, i = -rprecision, rprecision)]
51exprange
52-30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, +0, +1, +2, +3, +4, +5, +6, +7, +8, +9, +10, +11, +12, +13, +14, +15, +16, +17, +18, +19, +20, +21, +22, +23, +24, +25, +26, +27, +28, +29, +30
53allocate(gamIncLow(size(exprange)), gamIncUpp(size(exprange)), info(size(exprange)))
54call setGammaIncGil(gamIncLow, gamIncUpp, x = 10._RKG**exprange, kappa = 10._RKG**exprange, info = info)
55reshape([10._RKG**exprange, gamIncLow, real(info, RKG)], shape = [size(info), 3])
56+0.99999999999999991E-30, +1.0000000000000000, +0.0000000000000000
57+0.10000000000000001E-28, +1.0000000000000000, +0.0000000000000000
58+0.10000000000000001E-27, +1.0000000000000000, +0.0000000000000000
59+0.10000000000000000E-26, +1.0000000000000000, +0.0000000000000000
60+0.99999999999999990E-26, +1.0000000000000000, +0.0000000000000000
61+0.99999999999999992E-25, +1.0000000000000000, +0.0000000000000000
62+0.10000000000000001E-23, +1.0000000000000000, +0.0000000000000000
63+0.10000000000000001E-22, +1.0000000000000000, +0.0000000000000000
64+0.10000000000000000E-21, +1.0000000000000000, +0.0000000000000000
65+0.99999999999999991E-21, +1.0000000000000000, +0.0000000000000000
66+0.99999999999999995E-20, +1.0000000000000000, +0.0000000000000000
67+0.99999999999999998E-19, +1.0000000000000000, +0.0000000000000000
68+0.10000000000000001E-17, +1.0000000000000000, +0.0000000000000000
69+0.10000000000000001E-16, +0.99999999999999967, +0.0000000000000000
70+0.99999999999999998E-16, +0.99999999999999634, +0.0000000000000000
71+0.10000000000000001E-14, +0.99999999999996603, +0.0000000000000000
72+0.10000000000000000E-13, +0.99999999999968336, +0.0000000000000000
73+0.10000000000000000E-12, +0.99999999999706435, +0.0000000000000000
74+0.99999999999999998E-12, +0.99999999997294620, +0.0000000000000000
75+0.99999999999999994E-11, +0.99999999975248777, +0.0000000000000000
76+0.10000000000000000E-9, +0.99999999775513648, +0.0000000000000000
77+0.10000000000000001E-8, +0.99999997985395006, +0.0000000000000000
78+0.10000000000000000E-7, +0.99999982156536493, +0.0000000000000000
79+0.99999999999999995E-7, +0.99999844591319076, +0.0000000000000000
80+0.99999999999999995E-6, +0.99998676179091028, +0.0000000000000000
81+0.10000000000000001E-4, +0.99989064869904365, +0.0000000000000000
82+0.10000000000000000E-3, +0.99913704186899344, +0.0000000000000000
83+0.10000000000000000E-2, +0.99368764670886034, +0.0000000000000000
84+0.10000000000000000E-1, +0.96034742352150926, +0.0000000000000000
85+0.10000000000000001, +0.82755175958585059, +0.0000000000000000
86+1.0000000000000000, +0.63212055882855767, +0.0000000000000000
87+10.000000000000000, +0.54207028552814762, +0.0000000000000000
88+100.00000000000000, +0.51329879827914859, +0.0000000000000000
89+1000.0000000000000, +0.50420524418021551, +0.0000000000000000
90+10000.000000000000, +0.50132980833995522, +0.0000000000000000
91+100000.00000000000, +0.50042052211036525, +0.0000000000000000
92+1000000.0000000000, +0.50013298076087254, +0.0000000000000000
93+10000000.000000000, +0.50004205220872366, +0.0000000000000000
94+100000000.00000000, +0.50001329807601413, +0.0000000000000000
95+1000000000.0000000, +0.50000420522087008, +0.0000000000000000
96+10000000000.000000, +0.50000132980760137, +0.0000000000000000
97+100000000000.00000, +0.50000042052208693, +0.0000000000000000
98+1000000000000.0000, +0.50000013298076018, +0.0000000000000000
99+10000000000000.000, +0.50000004205220872, +0.0000000000000000
100+100000000000000.00, +0.50000001329807597, +0.0000000000000000
101+1000000000000000.0, +0.50000000420522084, +0.0000000000000000
102+10000000000000000., +0.50000000132980760, +0.0000000000000000
103+0.10000000000000000E+18, +0.50000000042052206, +0.0000000000000000
104+0.10000000000000000E+19, +0.50000000013298074, +0.0000000000000000
105+0.10000000000000000E+20, +0.50000000004205214, +0.0000000000000000
106+0.10000000000000000E+21, +0.50000000001329803, +0.0000000000000000
107+0.10000000000000000E+22, +0.50000000000420530, +0.0000000000000000
108+0.10000000000000000E+23, +0.50000000000132983, +0.0000000000000000
109+0.99999999999999992E+23, +0.50000000000042055, +0.0000000000000000
110+0.99999999999999998E+24, +0.50000000000013300, +0.0000000000000000
111+0.10000000000000001E+26, +0.50000000000004208, +0.0000000000000000
112+0.10000000000000000E+27, +0.50000000000001332, +0.0000000000000000
113+0.10000000000000000E+28, +0.50000000000000422, +0.0000000000000000
114+0.99999999999999996E+28, +0.50000000000000133, +0.0000000000000000
115+0.99999999999999991E+29, +0.50000000000000044, +0.0000000000000000
116+0.10000000000000000E+31, +0.50000000000000011, +0.0000000000000000
117
118
119rprecision = precision(0._RKG) * 2
120rprecision
121+66
122exprange = [(i, i = -rprecision, rprecision)]
123exprange
124-66, -65, -64, -63, -62, -61, -60, -59, -58, -57, -56, -55, -54, -53, -52, -51, -50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40, -39, -38, -37, -36, -35, -34, -33, -32, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, +0, +1, +2, +3, +4, +5, +6, +7, +8, +9, +10, +11, +12, +13, +14, +15, +16, +17, +18, +19, +20, +21, +22, +23, +24, +25, +26, +27, +28, +29, +30, +31, +32, +33, +34, +35, +36, +37, +38, +39, +40, +41, +42, +43, +44, +45, +46, +47, +48, +49, +50, +51, +52, +53, +54, +55, +56, +57, +58, +59, +60, +61, +62, +63, +64, +65, +66
125allocate(gamIncLow(size(exprange)), gamIncUpp(size(exprange)), info(size(exprange)))
126call setGammaIncGil(gamIncLow, gamIncUpp, x = 10._RKG**exprange, kappa = 10._RKG**exprange, info = info)
127reshape([10._RKG**exprange, gamIncLow, real(info, RKG)], shape = [size(info), 3])
128+0.100000000000000000000000000000000475E-65, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
129+0.100000000000000000000000000000000468E-64, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
130+0.100000000000000000000000000000000457E-63, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
131+0.100000000000000000000000000000000451E-62, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
132+0.100000000000000000000000000000000463E-61, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
133+0.100000000000000000000000000000000444E-60, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
134+0.100000000000000000000000000000000432E-59, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
135+0.100000000000000000000000000000000420E-58, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
136+0.100000000000000000000000000000000412E-57, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
137+0.100000000000000000000000000000000409E-56, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
138+0.100000000000000000000000000000000395E-55, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
139+0.100000000000000000000000000000000381E-54, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
140+0.100000000000000000000000000000000397E-53, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
141+0.100000000000000000000000000000000384E-52, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
142+0.100000000000000000000000000000000378E-51, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
143+0.100000000000000000000000000000000365E-50, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
144+0.100000000000000000000000000000000355E-49, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
145+0.100000000000000000000000000000000353E-48, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
146+0.100000000000000000000000000000000346E-47, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
147+0.100000000000000000000000000000000333E-46, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
148+0.100000000000000000000000000000000339E-45, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
149+0.100000000000000000000000000000000336E-44, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
150+0.100000000000000000000000000000000328E-43, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
151+0.100000000000000000000000000000000304E-42, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
152+0.100000000000000000000000000000000301E-41, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
153+0.100000000000000000000000000000000301E-40, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
154+0.100000000000000000000000000000000296E-39, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
155+0.100000000000000000000000000000000268E-38, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
156+0.100000000000000000000000000000000276E-37, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
157+0.100000000000000000000000000000000265E-36, +1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000
158+0.100000000000000000000000000000000269E-35, +0.999999999999999999999999999999999904, +0.00000000000000000000000000000000000
159+0.100000000000000000000000000000000246E-34, +0.999999999999999999999999999999999230, +0.00000000000000000000000000000000000
160+0.100000000000000000000000000000000239E-33, +0.999999999999999999999999999999992200, +0.00000000000000000000000000000000000
161+0.100000000000000000000000000000000242E-32, +0.999999999999999999999999999999924600, +0.00000000000000000000000000000000000
162+0.100000000000000000000000000000000230E-31, +0.999999999999999999999999999999268917, +0.00000000000000000000000000000000000
163+0.100000000000000000000000000000000216E-30, +0.999999999999999999999999999992919704, +0.00000000000000000000000000000000000
164+0.100000000000000000000000000000000228E-29, +0.999999999999999999999999999931499679, +0.00000000000000000000000000000000000
165+0.100000000000000000000000000000000212E-28, +0.999999999999999999999999999338022441, +0.00000000000000000000000000000000000
166+0.100000000000000000000000000000000208E-27, +0.999999999999999999999999993610483298, +0.00000000000000000000000000000000000
167+0.100000000000000000000000000000000196E-26, +0.999999999999999999999999938407418198, +0.00000000000000000000000000000000000
168+0.100000000000000000000000000000000187E-25, +0.999999999999999999999999407100032438, +0.00000000000000000000000000000000000
169+0.100000000000000000000000000000000177E-24, +0.999999999999999999999994301258833966, +0.00000000000000000000000000000000000
170+0.100000000000000000000000000000000169E-23, +0.999999999999999999999945315173433069, +0.00000000000000000000000000000000000
171+0.100000000000000000000000000000000153E-22, +0.999999999999999999999476177585260410, +0.00000000000000000000000000000000000
172+0.100000000000000000000000000000000165E-21, +0.999999999999999999994992034361903273, +0.00000000000000000000000000000000000
173+0.100000000000000000000000000000000151E-20, +0.999999999999999999952222928712026561, +0.00000000000000000000000000000000000
174+0.100000000000000000000000000000000145E-19, +0.999999999999999999545255138050206146, +0.00000000000000000000000000000000000
175+0.100000000000000000000000000000000132E-18, +0.999999999999999995682809889801466461, +0.00000000000000000000000000000000000
176+0.100000000000000000000000000000000129E-17, +0.999999999999999959130683991008711382, +0.00000000000000000000000000000000000
177+0.100000000000000000000000000000000119E-16, +0.999999999999999614332690840027636544, +0.00000000000000000000000000000000000
178+0.100000000000000000000000000000000114E-15, +0.999999999999996373585417699686748847, +0.00000000000000000000000000000000000
179+0.100000000000000000000000000000000101E-14, +0.999999999999966038439269991422471636, +0.00000000000000000000000000000000000
180+0.100000000000000000000000000000000108E-13, +0.999999999999683410243629898865133795, +0.00000000000000000000000000000000000
181+0.100000000000000000000000000000000100E-12, +0.999999999997064360945602184660495791, +0.00000000000000000000000000000000000
182+0.100000000000000000000000000000000096E-11, +0.999999999972946194549337116380045088, +0.00000000000000000000000000000000000
183+0.100000000000000000000000000000000075E-10, +0.999999999752487796450119202118859619, +0.00000000000000000000000000000000000
184+0.100000000000000000000000000000000072E-9, +0.999999997755136475997589056179272555, +0.00000000000000000000000000000000000
185+0.100000000000000000000000000000000065E-8, +0.999999979853950029064322113904329775, +0.00000000000000000000000000000000000
186+0.100000000000000000000000000000000058E-7, +0.999999821565364946706359216161737009, +0.00000000000000000000000000000000000
187+0.100000000000000000000000000000000043E-6, +0.999998445913190763809082249812063593, +0.00000000000000000000000000000000000
188+0.100000000000000000000000000000000048E-5, +0.999986761790910335167378117922698844, +0.00000000000000000000000000000000000
189+0.100000000000000000000000000000000041E-4, +0.999890648699043670145241732485521290, +0.00000000000000000000000000000000000
190+0.100000000000000000000000000000000032E-3, +0.999137041868993400061435556832101876, +0.00000000000000000000000000000000000
191+0.100000000000000000000000000000000013E-2, +0.993687646708860290206558750403283676, +0.00000000000000000000000000000000000
192+0.100000000000000000000000000000000017E-1, +0.960347423521509198326882715453714384, +0.00000000000000000000000000000000000
193+0.100000000000000000000000000000000005, +0.827551759585850541450312389744143485, +0.00000000000000000000000000000000000
194+1.00000000000000000000000000000000000, +0.632120558828557678404476229838539127, +0.00000000000000000000000000000000000
195+10.0000000000000000000000000000000000, +0.542070285528147791685845370654762642, +0.00000000000000000000000000000000000
196+100.000000000000000000000000000000000, +0.513298798279148664857314256560736836, +0.00000000000000000000000000000000000
197+1000.00000000000000000000000000000000, +0.504205244180215508503777843602118862, +0.00000000000000000000000000000000000
198+10000.0000000000000000000000000000000, +0.501329808339955200382742251299851386, +0.00000000000000000000000000000000000
199+100000.000000000000000000000000000000, +0.500420522110365176693312579043826337, +0.00000000000000000000000000000000000
200+1000000.00000000000000000000000000000, +0.500132980760872591244322817503206681, +0.00000000000000000000000000000000000
201+10000000.0000000000000000000000000000, +0.500042052208723698333756164784025937, +0.00000000000000000000000000000000000
202+100000000.000000000000000000000000000, +0.500013298076014119871248917592827104, +0.00000000000000000000000000000000000
203+1000000000.00000000000000000000000000, +0.500004205220870056962418526621128081, +0.00000000000000000000000000000000000
204+10000000000.0000000000000000000000000, +0.500001329807601338847708467065353556, +0.00000000000000000000000000000000000
205+100000000000.000000000000000000000000, +0.500000420522087003383370379357918933, +0.00000000000000000000000000000000000
206+1000000000000.00000000000000000000000, +0.500000132980760133811631428649428437, +0.00000000000000000000000000000000000
207+10000000000000.0000000000000000000000, +0.500000042052208700336024166457325569, +0.00000000000000000000000000000000000
208+100000000000000.000000000000000000000, +0.500000013298076013381090003446869344, +0.00000000000000000000000000000000000
209+1000000000000000.00000000000000000000, +0.500000004205220870033600103774254030, +0.00000000000000000000000000000000000
210+10000000000000000.0000000000000000000, +0.500000001329807601338108927205268918, +0.00000000000000000000000000000000000
211+100000000000000000.000000000000000000, +0.500000000420522087003360008064553908, +0.00000000000000000000000000000000000
212+1000000000000000000.00000000000000000, +0.500000000132980760133810892647387449, +0.00000000000000000000000000000000000
213+10000000000000000000.0000000000000000, +0.500000000042052208700336000804142541, +0.00000000000000000000000000000000000
214+100000000000000000000.000000000000000, +0.500000000013298076013381089264665675, +0.00000000000000000000000000000000000
215+1000000000000000000000.00000000000000, +0.500000000004205220870033600080411943, +0.00000000000000000000000000000000000
216+10000000000000000000000.0000000000000, +0.500000000001329807601338108926466452, +0.00000000000000000000000000000000000
217+100000000000000000000000.000000000000, +0.500000000000420522087003360008041223, +0.00000000000000000000000000000000000
218+1000000000000000000000000.00000000000, +0.500000000000132980760133810892646664, +0.00000000000000000000000000000000000
219+10000000000000000000000000.0000000000, +0.500000000000042052208700336000804084, +0.00000000000000000000000000000000000
220+100000000000000000000000000.000000000, +0.500000000000013298076013381089264705, +0.00000000000000000000000000000000000
221+1000000000000000000000000000.00000000, +0.500000000000004205220870033600080351, +0.00000000000000000000000000000000000
222+10000000000000000000000000000.0000000, +0.500000000000001329807601338108926490, +0.00000000000000000000000000000000000
223+100000000000000000000000000000.000000, +0.500000000000000420522087003360008093, +0.00000000000000000000000000000000000
224+1000000000000000000000000000000.00000, +0.500000000000000132980760133810892639, +0.00000000000000000000000000000000000
225+10000000000000000000000000000000.0000, +0.500000000000000042052208700336000790, +0.00000000000000000000000000000000000
226+100000000000000000000000000000000.000, +0.500000000000000013298076013381089225, +0.00000000000000000000000000000000000
227+1000000000000000000000000000000000.00, +0.500000000000000004205220870033600012, +0.00000000000000000000000000000000000
228+10000000000000000000000000000000000.0, +0.500000000000000001329807601338108942, +0.00000000000000000000000000000000000
229+100000000000000000000000000000000000., +0.500000000000000000420522087003360078, +0.00000000000000000000000000000000000
230+0.100000000000000000000000000000000000E+37, +0.500000000000000000132980760133810942, +0.00000000000000000000000000000000000
231+0.100000000000000000000000000000000000E+38, +0.500000000000000000042052208700335989, +0.00000000000000000000000000000000000
232+0.100000000000000000000000000000000000E+39, +0.500000000000000000013298076013381094, +0.00000000000000000000000000000000000
233+0.100000000000000000000000000000000000E+40, +0.500000000000000000004205220870033589, +0.00000000000000000000000000000000000
234+0.100000000000000000000000000000000000E+41, +0.500000000000000000001329807601338090, +0.00000000000000000000000000000000000
235+0.100000000000000000000000000000000000E+42, +0.500000000000000000000420522087003349, +0.00000000000000000000000000000000000
236+0.100000000000000000000000000000000000E+43, +0.500000000000000000000132980760133742, +0.00000000000000000000000000000000000
237+0.100000000000000000000000000000000000E+44, +0.500000000000000000000042052208700296, +0.00000000000000000000000000000000000
238+0.100000000000000000000000000000000000E+45, +0.500000000000000000000013298076013413, +0.00000000000000000000000000000000000
239+0.100000000000000000000000000000000000E+46, +0.500000000000000000000004205220870049, +0.00000000000000000000000000000000000
240+0.100000000000000000000000000000000000E+47, +0.500000000000000000000001329807601361, +0.00000000000000000000000000000000000
241+0.100000000000000000000000000000000000E+48, +0.500000000000000000000000420522086947, +0.00000000000000000000000000000000000
242+0.100000000000000000000000000000000000E+49, +0.500000000000000000000000132980760117, +0.00000000000000000000000000000000000
243+0.999999999999999999999999999999999944E+49, +0.500000000000000000000000042052208675, +0.00000000000000000000000000000000000
244+0.100000000000000000000000000000000008E+51, +0.500000000000000000000000013298075954, +0.00000000000000000000000000000000000
245+0.100000000000000000000000000000000001E+52, +0.500000000000000000000000004205220848, +0.00000000000000000000000000000000000
246+0.100000000000000000000000000000000004E+53, +0.500000000000000000000000001329807634, +0.00000000000000000000000000000000000
247+0.100000000000000000000000000000000008E+54, +0.500000000000000000000000000420522085, +0.00000000000000000000000000000000000
248+0.100000000000000000000000000000000004E+55, +0.500000000000000000000000000132980744, +0.00000000000000000000000000000000000
249+0.100000000000000000000000000000000004E+56, +0.500000000000000000000000000042052199, +0.00000000000000000000000000000000000
250+0.999999999999999999999999999999999950E+56, +0.500000000000000000000000000013298065, +0.00000000000000000000000000000000000
251+0.100000000000000000000000000000000003E+58, +0.500000000000000000000000000004205268, +0.00000000000000000000000000000000000
252+0.100000000000000000000000000000000006E+59, +0.500000000000000000000000000001329855, +0.00000000000000000000000000000000000
253+0.100000000000000000000000000000000003E+60, +0.500000000000000000000000000000420527, +0.00000000000000000000000000000000000
254+0.100000000000000000000000000000000003E+61, +0.500000000000000000000000000000132985, +0.00000000000000000000000000000000000
255+0.100000000000000000000000000000000000E+62, +0.500000000000000000000000000000041985, +0.00000000000000000000000000000000000
256+0.100000000000000000000000000000000003E+63, +0.500000000000000000000000000000013289, +0.00000000000000000000000000000000000
257+0.100000000000000000000000000000000003E+64, +0.500000000000000000000000000000004237, +0.00000000000000000000000000000000000
258+0.999999999999999999999999999999999962E+64, +0.500000000000000000000000000000001348, +0.00000000000000000000000000000000000
259+0.100000000000000000000000000000000001E+66, +0.500000000000000000000000000000000385, +0.00000000000000000000000000000000000
260+0.999999999999999999999999999999999932E+66, +0.500000000000000000000000000000000193, +0.00000000000000000000000000000000000
261
262

Postprocessing of the example output
1#!/usr/bin/env python
2
3import matplotlib.pyplot as plt
4import pandas as pd
5import numpy as np
6import glob
7import sys
8
9fontsize = 17
10
11marker ={ "CK" : "-"
12 , "IK" : "."
13 , "RK" : "-"
14 }
15xlab = { "CK" : r"x ( real/imaginary )"
16 , "IK" : r"x ( integer-valued )"
17 , "RK" : r"x ( real-valued )"
18 }
19labels = [r"shape parameter: $\kappa = 2$"]
20
21for kind in ["IK", "CK", "RK"]:
22
23 pattern = "*." + kind + ".txt"
24 fileList = glob.glob(pattern)
25 if len(fileList) == 1:
26
27 df = pd.read_csv(fileList[0], delimiter = " ")
28
29 fig = plt.figure(figsize = 1.25 * np.array([6.4, 4.8]), dpi = 200)
30 ax = plt.subplot()
31
32 if kind == "CK":
33 plt.plot( df.values[:, 0]
34 , df.values[:,2]
35 , marker[kind]
36 , color = "r"
37 )
38 plt.plot( df.values[:, 1]
39 , df.values[:,3]
40 , marker[kind]
41 , color = "blue"
42 )
43 else:
44 plt.plot( df.values[:, 0]
45 , df.values[:, 1]
46 , marker[kind]
47 , color = "r"
48 )
49
50 plt.xticks(fontsize = fontsize - 2)
51 plt.yticks(fontsize = fontsize - 2)
52 ax.set_xlabel(xlab[kind], fontsize = fontsize)
53 ax.set_ylabel("Regularized Lower\nIncomplete Gamma Function", fontsize = fontsize)
54
55 plt.grid(visible = True, which = "both", axis = "both", color = "0.85", linestyle = "-")
56 ax.tick_params(axis = "y", which = "minor")
57 ax.tick_params(axis = "x", which = "minor")
58
59 ax.legend ( labels
60 , fontsize = fontsize
61 #, loc = "center left"
62 #, bbox_to_anchor = (1, 0.5)
63 )
64
65 plt.savefig(fileList[0].replace(".txt",".png"))
66
67 elif len(fileList) > 1:
68
69 sys.exit("Ambiguous file list exists.")

Visualization of the example output
Test:
test_pm_mathGammaGil


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:
Fatemeh Bagheri, Monday 12:36 pm, August 16, 2021, Dallas TX

Definition at line 421 of file pm_mathGammaGil.F90.


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