ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_math1mexp.F90
Go to the documentation of this file.
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
39
40!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41
43
44 use pm_kind, only: SK, IK, LK
46
47 implicit none
48
49 character(*, SK), parameter :: MODULE_NAME = "@pm_math1mexp"
50
51!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52
133 interface get1mexp
134
135 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
136 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
137 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
138
139 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
140
141#if CK5_ENABLED
142 PURE elemental module function get1mexpSeq_CK5(x) result(onemexp)
143#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
144 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_CK5
145#endif
146 use pm_kind, only: CKG => CK5
147 complex(CKG) , intent(in) :: x
148 complex(CKG) :: onemexp
149 end function
150#endif
151
152#if CK4_ENABLED
153 PURE elemental module function get1mexpSeq_CK4(x) result(onemexp)
154#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
155 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_CK4
156#endif
157 use pm_kind, only: CKG => CK4
158 complex(CKG) , intent(in) :: x
159 complex(CKG) :: onemexp
160 end function
161#endif
162
163#if CK3_ENABLED
164 PURE elemental module function get1mexpSeq_CK3(x) result(onemexp)
165#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
166 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_CK3
167#endif
168 use pm_kind, only: CKG => CK3
169 complex(CKG) , intent(in) :: x
170 complex(CKG) :: onemexp
171 end function
172#endif
173
174#if CK2_ENABLED
175 PURE elemental module function get1mexpSeq_CK2(x) result(onemexp)
176#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
177 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_CK2
178#endif
179 use pm_kind, only: CKG => CK2
180 complex(CKG) , intent(in) :: x
181 complex(CKG) :: onemexp
182 end function
183#endif
184
185#if CK1_ENABLED
186 PURE elemental module function get1mexpSeq_CK1(x) result(onemexp)
187#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
188 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_CK1
189#endif
190 use pm_kind, only: CKG => CK1
191 complex(CKG) , intent(in) :: x
192 complex(CKG) :: onemexp
193 end function
194#endif
195
196 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
197
198#if RK5_ENABLED
199 PURE elemental module function get1mexpSeq_RK5(x) result(onemexp)
200#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
201 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_RK5
202#endif
203 use pm_kind, only: RKG => RK5
204 real(RKG) , intent(in) :: x
205 real(RKG) :: onemexp
206 end function
207#endif
208
209#if RK4_ENABLED
210 PURE elemental module function get1mexpSeq_RK4(x) result(onemexp)
211#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
212 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_RK4
213#endif
214 use pm_kind, only: RKG => RK4
215 real(RKG) , intent(in) :: x
216 real(RKG) :: onemexp
217 end function
218#endif
219
220#if RK3_ENABLED
221 PURE elemental module function get1mexpSeq_RK3(x) result(onemexp)
222#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
223 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_RK3
224#endif
225 use pm_kind, only: RKG => RK3
226 real(RKG) , intent(in) :: x
227 real(RKG) :: onemexp
228 end function
229#endif
230
231#if RK2_ENABLED
232 PURE elemental module function get1mexpSeq_RK2(x) result(onemexp)
233#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
234 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_RK2
235#endif
236 use pm_kind, only: RKG => RK2
237 real(RKG) , intent(in) :: x
238 real(RKG) :: onemexp
239 end function
240#endif
241
242#if RK1_ENABLED
243 PURE elemental module function get1mexpSeq_RK1(x) result(onemexp)
244#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
245 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSeq_RK1
246#endif
247 use pm_kind, only: RKG => RK1
248 real(RKG) , intent(in) :: x
249 real(RKG) :: onemexp
250 end function
251#endif
252
253 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
254
255 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
256 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
257 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
258
259 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
260
261#if CK5_ENABLED
262 PURE elemental module function get1mexpSel_CK5(x, control) result(onemexp)
263#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
264 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_CK5
265#endif
266 use pm_kind, only: CKG => CK5
267 complex(CKG) , intent(in) :: x
268 complex(CKG) :: onemexp
269 type(selection_type), intent(in) :: control
270 end function
271#endif
272
273#if CK4_ENABLED
274 PURE elemental module function get1mexpSel_CK4(x, control) result(onemexp)
275#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
276 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_CK4
277#endif
278 use pm_kind, only: CKG => CK4
279 complex(CKG) , intent(in) :: x
280 complex(CKG) :: onemexp
281 type(selection_type), intent(in) :: control
282 end function
283#endif
284
285#if CK3_ENABLED
286 PURE elemental module function get1mexpSel_CK3(x, control) result(onemexp)
287#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
288 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_CK3
289#endif
290 use pm_kind, only: CKG => CK3
291 complex(CKG) , intent(in) :: x
292 complex(CKG) :: onemexp
293 type(selection_type), intent(in) :: control
294 end function
295#endif
296
297#if CK2_ENABLED
298 PURE elemental module function get1mexpSel_CK2(x, control) result(onemexp)
299#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
300 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_CK2
301#endif
302 use pm_kind, only: CKG => CK2
303 complex(CKG) , intent(in) :: x
304 complex(CKG) :: onemexp
305 type(selection_type), intent(in) :: control
306 end function
307#endif
308
309#if CK1_ENABLED
310 PURE elemental module function get1mexpSel_CK1(x, control) result(onemexp)
311#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
312 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_CK1
313#endif
314 use pm_kind, only: CKG => CK1
315 complex(CKG) , intent(in) :: x
316 complex(CKG) :: onemexp
317 type(selection_type), intent(in) :: control
318 end function
319#endif
320
321 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322
323#if RK5_ENABLED
324 PURE elemental module function get1mexpSel_RK5(x, control) result(onemexp)
325#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
326 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_RK5
327#endif
328 use pm_kind, only: RKG => RK5
329 real(RKG) , intent(in) :: x
330 real(RKG) :: onemexp
331 type(selection_type), intent(in) :: control
332 end function
333#endif
334
335#if RK4_ENABLED
336 PURE elemental module function get1mexpSel_RK4(x, control) result(onemexp)
337#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
338 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_RK4
339#endif
340 use pm_kind, only: RKG => RK4
341 real(RKG) , intent(in) :: x
342 real(RKG) :: onemexp
343 type(selection_type), intent(in) :: control
344 end function
345#endif
346
347#if RK3_ENABLED
348 PURE elemental module function get1mexpSel_RK3(x, control) result(onemexp)
349#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
350 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_RK3
351#endif
352 use pm_kind, only: RKG => RK3
353 real(RKG) , intent(in) :: x
354 real(RKG) :: onemexp
355 type(selection_type), intent(in) :: control
356 end function
357#endif
358
359#if RK2_ENABLED
360 PURE elemental module function get1mexpSel_RK2(x, control) result(onemexp)
361#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
362 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_RK2
363#endif
364 use pm_kind, only: RKG => RK2
365 real(RKG) , intent(in) :: x
366 real(RKG) :: onemexp
367 type(selection_type), intent(in) :: control
368 end function
369#endif
370
371#if RK1_ENABLED
372 PURE elemental module function get1mexpSel_RK1(x, control) result(onemexp)
373#if __INTEL_COMPILER && DLL_ENABLED && (_WIN32 || _WIN64)
374 !DEC$ ATTRIBUTES DLLEXPORT :: get1mexpSel_RK1
375#endif
376 use pm_kind, only: RKG => RK1
377 real(RKG) , intent(in) :: x
378 real(RKG) :: onemexp
379 type(selection_type), intent(in) :: control
380 end function
381#endif
382
383 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
384
385 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
386 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
387 !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
388
389 end interface
390
391!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
392
393end module pm_math1mexp ! LCOV_EXCL_LINE
Generate and return the expression 1 - exp(x) robustly (without numerical underflow).
This module contains abstract and concrete derived types that are required for compile-time resolutio...
Definition: pm_control.F90:45
character(*, SK), parameter MODULE_NAME
Definition: pm_control.F90:51
type(selection_type), parameter selection
This is a scalar parameter object of type selection_type that is exclusively used to request selectio...
Definition: pm_control.F90:320
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter RK5
Definition: pm_kind.F90:478
integer, parameter RK4
Definition: pm_kind.F90:489
integer, parameter RK2
Definition: pm_kind.F90:511
integer, parameter CK1
Definition: pm_kind.F90:464
integer, parameter RK3
Definition: pm_kind.F90:500
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter CK5
Definition: pm_kind.F90:420
integer, parameter CK4
Definition: pm_kind.F90:431
integer, parameter CK2
Definition: pm_kind.F90:453
integer, parameter CK3
Definition: pm_kind.F90:442
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 RK1
Definition: pm_kind.F90:522
This module contains procedures and generic interfaces for computing 1 - exp(x) more precisely for ti...
This is a concrete derived type whose instances are exclusively used to request selection control flo...
Definition: pm_control.F90:295