Line data Source code
1 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
2 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3 : !!!! !!!!
4 : !!!! ParaMonte: Parallel Monte Carlo and Machine Learning Library. !!!!
5 : !!!! !!!!
6 : !!!! Copyright (C) 2012-present, The Computational Data Science Lab !!!!
7 : !!!! !!!!
8 : !!!! This file is part of the ParaMonte library. !!!!
9 : !!!! !!!!
10 : !!!! LICENSE !!!!
11 : !!!! !!!!
12 : !!!! https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md !!!!
13 : !!!! !!!!
14 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15 : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16 :
17 : !> \brief
18 : !> This file contains procedure implementations of [pm_mathGamma](@ref pm_mathGamma).
19 : !>
20 : !> \finmain
21 : !>
22 : !> \author
23 : !> \FatemehBagheri, Wednesday 5:03 PM, August 11, 2021, Dallas, TX
24 :
25 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
26 :
27 : submodule (pm_mathGamma) routines ! LCOV_EXCL_LINE
28 :
29 : #if CHECK_ENABLED
30 : use pm_err, only: getFine
31 : use pm_val2str, only: getStr
32 : use pm_err, only: setAsserted
33 : use pm_option, only: getOption
34 : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) \
35 : call setAsserted(ASSERTION,getFine(__FILE__,LINE)//MODULE_NAME//MSG);
36 : #else
37 : use pm_val2str, only: getStr
38 : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) continue;
39 : #endif
40 :
41 : implicit none
42 :
43 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
44 :
45 : contains
46 :
47 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48 :
49 : #define getGammaInc_ENABLED 1
50 :
51 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
54 :
55 : #define Low_ENABLED 1
56 :
57 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
58 :
59 : #define RK_ENABLED 1
60 :
61 : #if RK5_ENABLED
62 : module procedure getGammaIncLow_RK5
63 : use pm_kind, only: RKC => RK5
64 : #include "pm_mathGamma@routines.inc.F90"
65 : end procedure
66 : #endif
67 :
68 : #if RK4_ENABLED
69 17 : module procedure getGammaIncLow_RK4
70 : use pm_kind, only: RKC => RK4
71 : #include "pm_mathGamma@routines.inc.F90"
72 17 : end procedure
73 : #endif
74 :
75 : #if RK3_ENABLED
76 0 : module procedure getGammaIncLow_RK3
77 : use pm_kind, only: RKC => RK3
78 : #include "pm_mathGamma@routines.inc.F90"
79 0 : end procedure
80 : #endif
81 :
82 : #if RK2_ENABLED
83 14 : module procedure getGammaIncLow_RK2
84 : use pm_kind, only: RKC => RK2
85 : #include "pm_mathGamma@routines.inc.F90"
86 14 : end procedure
87 : #endif
88 :
89 : #if RK1_ENABLED
90 3014 : module procedure getGammaIncLow_RK1
91 : use pm_kind, only: RKC => RK1
92 : #include "pm_mathGamma@routines.inc.F90"
93 3014 : end procedure
94 : #endif
95 :
96 : #undef RK_ENABLED
97 :
98 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
99 :
100 : #undef Low_ENABLED
101 :
102 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
103 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
104 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
105 :
106 : #define Upp_ENABLED 1
107 :
108 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
109 :
110 : #define RK_ENABLED 1
111 :
112 : #if RK5_ENABLED
113 : module procedure getGammaIncUpp_RK5
114 : use pm_kind, only: RKC => RK5
115 : #include "pm_mathGamma@routines.inc.F90"
116 : end procedure
117 : #endif
118 :
119 : #if RK4_ENABLED
120 14 : module procedure getGammaIncUpp_RK4
121 : use pm_kind, only: RKC => RK4
122 : #include "pm_mathGamma@routines.inc.F90"
123 14 : end procedure
124 : #endif
125 :
126 : #if RK3_ENABLED
127 0 : module procedure getGammaIncUpp_RK3
128 : use pm_kind, only: RKC => RK3
129 : #include "pm_mathGamma@routines.inc.F90"
130 0 : end procedure
131 : #endif
132 :
133 : #if RK2_ENABLED
134 10 : module procedure getGammaIncUpp_RK2
135 : use pm_kind, only: RKC => RK2
136 : #include "pm_mathGamma@routines.inc.F90"
137 10 : end procedure
138 : #endif
139 :
140 : #if RK1_ENABLED
141 3010 : module procedure getGammaIncUpp_RK1
142 : use pm_kind, only: RKC => RK1
143 : #include "pm_mathGamma@routines.inc.F90"
144 3010 : end procedure
145 : #endif
146 :
147 : #undef RK_ENABLED
148 :
149 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
150 :
151 : #undef Upp_ENABLED
152 :
153 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
154 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
155 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
156 :
157 : #undef getGammaInc_ENABLED
158 :
159 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
160 :
161 : #define setGammaInc_ENABLED 1
162 :
163 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
164 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
165 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
166 :
167 : #define Def_ENABLED 1
168 :
169 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
170 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
171 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
172 :
173 : #define Low_ENABLED 1
174 :
175 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
176 :
177 : #define RK_ENABLED 1
178 :
179 : #if RK5_ENABLED
180 : module procedure setGammaIncLowDef_RK5
181 : use pm_kind, only: RKC => RK5
182 : #include "pm_mathGamma@routines.inc.F90"
183 : end procedure
184 : #endif
185 :
186 : #if RK4_ENABLED
187 32382 : module procedure setGammaIncLowDef_RK4
188 : use pm_kind, only: RKC => RK4
189 : #include "pm_mathGamma@routines.inc.F90"
190 32382 : end procedure
191 : #endif
192 :
193 : #if RK3_ENABLED
194 8 : module procedure setGammaIncLowDef_RK3
195 : use pm_kind, only: RKC => RK3
196 : #include "pm_mathGamma@routines.inc.F90"
197 8 : end procedure
198 : #endif
199 :
200 : #if RK2_ENABLED
201 13863 : module procedure setGammaIncLowDef_RK2
202 : use pm_kind, only: RKC => RK2
203 : #include "pm_mathGamma@routines.inc.F90"
204 13863 : end procedure
205 : #endif
206 :
207 : #if RK1_ENABLED
208 48141 : module procedure setGammaIncLowDef_RK1
209 : use pm_kind, only: RKC => RK1
210 : #include "pm_mathGamma@routines.inc.F90"
211 48141 : end procedure
212 : #endif
213 :
214 : #undef RK_ENABLED
215 :
216 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
217 :
218 : #undef Low_ENABLED
219 :
220 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
221 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
222 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
223 :
224 : #define Upp_ENABLED 1
225 :
226 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
227 :
228 : #define RK_ENABLED 1
229 :
230 : #if RK5_ENABLED
231 : module procedure setGammaIncUppDef_RK5
232 : use pm_kind, only: RKC => RK5
233 : #include "pm_mathGamma@routines.inc.F90"
234 : end procedure
235 : #endif
236 :
237 : #if RK4_ENABLED
238 15 : module procedure setGammaIncUppDef_RK4
239 : use pm_kind, only: RKC => RK4
240 : #include "pm_mathGamma@routines.inc.F90"
241 15 : end procedure
242 : #endif
243 :
244 : #if RK3_ENABLED
245 0 : module procedure setGammaIncUppDef_RK3
246 : use pm_kind, only: RKC => RK3
247 : #include "pm_mathGamma@routines.inc.F90"
248 0 : end procedure
249 : #endif
250 :
251 : #if RK2_ENABLED
252 197 : module procedure setGammaIncUppDef_RK2
253 : use pm_kind, only: RKC => RK2
254 : #include "pm_mathGamma@routines.inc.F90"
255 197 : end procedure
256 : #endif
257 :
258 : #if RK1_ENABLED
259 4011 : module procedure setGammaIncUppDef_RK1
260 : use pm_kind, only: RKC => RK1
261 : #include "pm_mathGamma@routines.inc.F90"
262 4011 : end procedure
263 : #endif
264 :
265 : #undef RK_ENABLED
266 :
267 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
268 :
269 : #undef Upp_ENABLED
270 :
271 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
272 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
273 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
274 :
275 : #undef Def_ENABLED
276 :
277 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
278 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
279 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
280 :
281 : #undef setGammaInc_ENABLED
282 :
283 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
284 :
285 : #define setGammaInc_ENABLED 1
286 :
287 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
288 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
289 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
290 :
291 : #define Series_ENABLED 1
292 :
293 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
294 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
295 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
296 :
297 : #define Low_ENABLED 1
298 :
299 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
300 :
301 : #define RK_ENABLED 1
302 :
303 : #if RK5_ENABLED
304 : module procedure setGammaIncLowSeries_RK5
305 : use pm_kind, only: RKC => RK5
306 : #include "pm_mathGamma@routines.inc.F90"
307 : end procedure
308 : #endif
309 :
310 : #if RK4_ENABLED
311 29490 : module procedure setGammaIncLowSeries_RK4
312 : use pm_kind, only: RKC => RK4
313 : #include "pm_mathGamma@routines.inc.F90"
314 : end procedure
315 : #endif
316 :
317 : #if RK3_ENABLED
318 4 : module procedure setGammaIncLowSeries_RK3
319 : use pm_kind, only: RKC => RK3
320 : #include "pm_mathGamma@routines.inc.F90"
321 : end procedure
322 : #endif
323 :
324 : #if RK2_ENABLED
325 14020 : module procedure setGammaIncLowSeries_RK2
326 : use pm_kind, only: RKC => RK2
327 : #include "pm_mathGamma@routines.inc.F90"
328 : end procedure
329 : #endif
330 :
331 : #if RK1_ENABLED
332 33877 : module procedure setGammaIncLowSeries_RK1
333 : use pm_kind, only: RKC => RK1
334 : #include "pm_mathGamma@routines.inc.F90"
335 : end procedure
336 : #endif
337 :
338 : #undef RK_ENABLED
339 :
340 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
341 :
342 : #undef Low_ENABLED
343 :
344 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
345 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
346 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
347 :
348 : #undef Series_ENABLED
349 :
350 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
351 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
352 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
353 :
354 : #undef setGammaInc_ENABLED
355 :
356 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
357 :
358 : #define setGammaInc_ENABLED 1
359 :
360 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
361 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
362 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
363 :
364 : #define ContFrac_ENABLED 1
365 :
366 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
367 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
368 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
369 :
370 : #define Upp_ENABLED 1
371 :
372 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
373 :
374 : #define RK_ENABLED 1
375 :
376 : #if RK5_ENABLED
377 : module procedure setGammaIncUppContFrac_RK5
378 : use pm_kind, only: RKC => RK5
379 : #include "pm_mathGamma@routines.inc.F90"
380 : end procedure
381 : #endif
382 :
383 : #if RK4_ENABLED
384 2909 : module procedure setGammaIncUppContFrac_RK4
385 : use pm_kind, only: RKC => RK4
386 : #include "pm_mathGamma@routines.inc.F90"
387 : end procedure
388 : #endif
389 :
390 : #if RK3_ENABLED
391 4 : module procedure setGammaIncUppContFrac_RK3
392 : use pm_kind, only: RKC => RK3
393 : #include "pm_mathGamma@routines.inc.F90"
394 : end procedure
395 : #endif
396 :
397 : #if RK2_ENABLED
398 42 : module procedure setGammaIncUppContFrac_RK2
399 : use pm_kind, only: RKC => RK2
400 : #include "pm_mathGamma@routines.inc.F90"
401 : end procedure
402 : #endif
403 :
404 : #if RK1_ENABLED
405 20277 : module procedure setGammaIncUppContFrac_RK1
406 : use pm_kind, only: RKC => RK1
407 : #include "pm_mathGamma@routines.inc.F90"
408 : end procedure
409 : #endif
410 :
411 : #undef RK_ENABLED
412 :
413 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
414 :
415 : #undef Upp_ENABLED
416 :
417 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
418 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
419 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
420 :
421 : #undef ContFrac_ENABLED
422 :
423 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
424 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
425 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
426 :
427 : #undef setGammaInc_ENABLED
428 :
429 : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
430 :
431 : #undef CHECK_ASSERTION
432 :
433 : end submodule routines
|