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

Generate count evenly-logarithmically-spaced points over the interval [base**logx1, base**logx2] if logx1 < logx2, or over the interval [logx2, logx1] if logx2 < logx1. More...

Detailed Description

Generate count evenly-logarithmically-spaced points over the interval [base**logx1, base**logx2] if logx1 < logx2, or over the interval [logx2, logx1] if logx2 < logx1.

Parameters
[in]logx1: The input scalar of type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128) representing the starting exponent such that base**logx1 is the starting value of the sequence.
[in]logx2: The input scalar of the same type and kind as logx1 representing the ending exponent such that base**logx1 is the last value of the sequence.
[in]count: The input scalar of type integer of default kind IK representing the length of logSpace to generate.
[in]fopen: The input scalar of type logical of default kind LK. If .true., the logSpace will be first-open, meaning that logx1 will NOT be in the output logSpace sequence
(optional, default = .false.)
[in]lopen: The input scalar of type logical of default kind LK. If .true., the logSpace will be last-open, meaning that logx2 will NOT be in the output logSpace sequence
(optional, default = .false.)
[in]base: The input scalar of the same type and kind as logx1 representing the base of the logarithm
(optional, default = exp(1), that is, Euler`s number).
Returns
logSpace : The output array of shape (1:count) of the same type and kind as the input logx1 containing the log-evenly-spaced sequence within the interval specified by logx1 and logx2.


Possible calling interfaces

logSpace = getLogSpace(logx1, logx2, count, fopen = fopen, lopen = lopen, base = base)
Generate count evenly-logarithmically-spaced points over the interval [base**logx1,...
This module contains procedures and generic interfaces for generating arrays with linear or logarithm...
Warning
The condition 0 < count must hold for the corresponding input arguments.
This condition is 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
Setting both fopen = .true. and lopen = .true. will lead to an output logSpace whose points are centers of the count equally-sized bins in the interval [logx1,logx2].
See also
setLogSpace
getLinSpace
setLinSpace


Example usage

1program example
2
3 use pm_kind, only: LK, SK
4 use pm_io, only: display_type
5 use pm_kind, only: IK, RKS, RKD, RKH, CKS, CKD, CKH
6 use pm_arraySpace, only: getLogSpace
7
8 implicit none
9
10 type(display_type) :: disp
11
12 disp = display_type(file = "main.out.F90")
13
14
15 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%")
16 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%")
17 call disp%show("Generate real logspace.")
18 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%")
19 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%")
20
21 call disp%skip
22 call disp%show("!%%%%%%%%%%")
23 call disp%show("32-bit real")
24 call disp%show("!%%%%%%%%%%")
25 call disp%skip
26
27 call disp%skip
28 call disp%show("getLogSpace(0._RKS, 4._RKS, 4_IK)")
29 call disp%show( getLogSpace(0._RKS, 4._RKS, 4_IK) )
30 call disp%show("getLogSpace(0._RKS, 4._RKS, 4_IK, base = 10._RKS)")
31 call disp%show( getLogSpace(0._RKS, 4._RKS, 4_IK, base = 10._RKS) )
32 call disp%show("getLogSpace(0._RKS, 4._RKS, 4_IK, fopen = .true._LK, base = 10._RKS)")
33 call disp%show( getLogSpace(0._RKS, 4._RKS, 4_IK, fopen = .true._LK, base = 10._RKS) )
34 call disp%show("getLogSpace(0._RKS, 4._RKS, 4_IK, lopen = .true._LK, base = 10._RKS)")
35 call disp%show( getLogSpace(0._RKS, 4._RKS, 4_IK, lopen = .true._LK, base = 10._RKS) )
36 call disp%show("getLogSpace(0._RKS, 4._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKS)")
37 call disp%show( getLogSpace(0._RKS, 4._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKS) )
38 call disp%skip
39
40 ! Generate sequence in reverse.
41
42 call disp%skip
43 call disp%show("getLogSpace(4._RKS, 0._RKS, 4_IK)")
44 call disp%show( getLogSpace(4._RKS, 0._RKS, 4_IK) )
45 call disp%show("getLogSpace(4._RKS, 0._RKS, 4_IK, base = 10._RKS)")
46 call disp%show( getLogSpace(4._RKS, 0._RKS, 4_IK, base = 10._RKS) )
47 call disp%show("getLogSpace(4._RKS, 0._RKS, 4_IK, fopen = .true._LK, base = 10._RKS)")
48 call disp%show( getLogSpace(4._RKS, 0._RKS, 4_IK, fopen = .true._LK, base = 10._RKS) )
49 call disp%show("getLogSpace(4._RKS, 0._RKS, 4_IK, lopen = .true._LK, base = 10._RKS)")
50 call disp%show( getLogSpace(4._RKS, 0._RKS, 4_IK, lopen = .true._LK, base = 10._RKS) )
51 call disp%show("getLogSpace(4._RKS, 0._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKS)")
52 call disp%show( getLogSpace(4._RKS, 0._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKS) )
53 call disp%skip
54
55 call disp%skip
56 call disp%show("!%%%%%%%%%%")
57 call disp%show("64-bit real")
58 call disp%show("!%%%%%%%%%%")
59 call disp%skip
60
61 call disp%skip
62 call disp%show("getLogSpace(0._RKD, 4._RKD, 4_IK)")
63 call disp%show( getLogSpace(0._RKD, 4._RKD, 4_IK) )
64 call disp%show("getLogSpace(0._RKD, 4._RKD, 4_IK, base = 10._RKD)")
65 call disp%show( getLogSpace(0._RKD, 4._RKD, 4_IK, base = 10._RKD) )
66 call disp%show("getLogSpace(0._RKD, 4._RKD, 4_IK, fopen = .true._LK, base = 10._RKD)")
67 call disp%show( getLogSpace(0._RKD, 4._RKD, 4_IK, fopen = .true._LK, base = 10._RKD) )
68 call disp%show("getLogSpace(0._RKD, 4._RKD, 4_IK, lopen = .true._LK, base = 10._RKD)")
69 call disp%show( getLogSpace(0._RKD, 4._RKD, 4_IK, lopen = .true._LK, base = 10._RKD) )
70 call disp%show("getLogSpace(0._RKD, 4._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKD)")
71 call disp%show( getLogSpace(0._RKD, 4._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKD) )
72 call disp%skip
73
74 ! Generate sequence in reverse.
75
76 call disp%skip
77 call disp%show("getLogSpace(4._RKD, 0._RKD, 4_IK)")
78 call disp%show( getLogSpace(4._RKD, 0._RKD, 4_IK) )
79 call disp%show("getLogSpace(4._RKD, 0._RKD, 4_IK, base = 10._RKD)")
80 call disp%show( getLogSpace(4._RKD, 0._RKD, 4_IK, base = 10._RKD) )
81 call disp%show("getLogSpace(4._RKD, 0._RKD, 4_IK, fopen = .true._LK, base = 10._RKD)")
82 call disp%show( getLogSpace(4._RKD, 0._RKD, 4_IK, fopen = .true._LK, base = 10._RKD) )
83 call disp%show("getLogSpace(4._RKD, 0._RKD, 4_IK, lopen = .true._LK, base = 10._RKD)")
84 call disp%show( getLogSpace(4._RKD, 0._RKD, 4_IK, lopen = .true._LK, base = 10._RKD) )
85 call disp%show("getLogSpace(4._RKD, 0._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKD)")
86 call disp%show( getLogSpace(4._RKD, 0._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKD) )
87 call disp%skip
88
89 call disp%skip
90 call disp%show("!%%%%%%%%%%%")
91 call disp%show("128-bit real")
92 call disp%show("!%%%%%%%%%%%")
93 call disp%skip
94
95 call disp%skip
96 call disp%show("getLogSpace(0._RKH, 4._RKH, 4_IK)")
97 call disp%show( getLogSpace(0._RKH, 4._RKH, 4_IK) )
98 call disp%show("getLogSpace(0._RKH, 4._RKH, 4_IK, base = 10._RKH)")
99 call disp%show( getLogSpace(0._RKH, 4._RKH, 4_IK, base = 10._RKH) )
100 call disp%show("getLogSpace(0._RKH, 4._RKH, 4_IK, fopen = .true._LK, base = 10._RKH)")
101 call disp%show( getLogSpace(0._RKH, 4._RKH, 4_IK, fopen = .true._LK, base = 10._RKH) )
102 call disp%show("getLogSpace(0._RKH, 4._RKH, 4_IK, lopen = .true._LK, base = 10._RKH)")
103 call disp%show( getLogSpace(0._RKH, 4._RKH, 4_IK, lopen = .true._LK, base = 10._RKH) )
104 call disp%show("getLogSpace(0._RKH, 4._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKH)")
105 call disp%show( getLogSpace(0._RKH, 4._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKH) )
106 call disp%skip
107
108 ! Generate sequence in reverse.
109
110 call disp%skip
111 call disp%show("getLogSpace(4._RKH, 0._RKH, 4_IK)")
112 call disp%show( getLogSpace(4._RKH, 0._RKH, 4_IK) )
113 call disp%show("getLogSpace(4._RKH, 0._RKH, 4_IK, base = 10._RKH)")
114 call disp%show( getLogSpace(4._RKH, 0._RKH, 4_IK, base = 10._RKH) )
115 call disp%show("getLogSpace(4._RKH, 0._RKH, 4_IK, fopen = .true._LK, base = 10._RKH)")
116 call disp%show( getLogSpace(4._RKH, 0._RKH, 4_IK, fopen = .true._LK, base = 10._RKH) )
117 call disp%show("getLogSpace(4._RKH, 0._RKH, 4_IK, lopen = .true._LK, base = 10._RKH)")
118 call disp%show( getLogSpace(4._RKH, 0._RKH, 4_IK, lopen = .true._LK, base = 10._RKH) )
119 call disp%show("getLogSpace(4._RKH, 0._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKH)")
120 call disp%show( getLogSpace(4._RKH, 0._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKH) )
121 call disp%skip
122
123 call disp%skip
124 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%")
125 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%")
126 call disp%show("Generate complex logspace.")
127 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%")
128 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%")
129 call disp%skip
130
131 call disp%skip
132 call disp%show("!%%%%%%%%%%%%%")
133 call disp%show("32-bit complex")
134 call disp%show("!%%%%%%%%%%%%%")
135 call disp%skip
136
137 call disp%skip
138 call disp%show("getLogSpace((1._CKS,1._CKS), (4._CKS,4._CKS), 4_IK)")
139 call disp%show( getLogSpace((1._CKS,1._CKS), (4._CKS,4._CKS), 4_IK) )
140 call disp%show("getLogSpace((1._CKS,1._CKS), (4._CKS,4._CKS), 4_IK, base = 10._CKS)")
141 call disp%show( getLogSpace((1._CKS,1._CKS), (4._CKS,4._CKS), 4_IK, base = 10._CKS) )
142 call disp%show("getLogSpace((0._CKS,0._CKS), (4._CKS,4._CKS), 4_IK, fopen = .true._LK, base = 10._CKS)")
143 call disp%show( getLogSpace((0._CKS,0._CKS), (4._CKS,4._CKS), 4_IK, fopen = .true._LK, base = 10._CKS) )
144 call disp%show("getLogSpace((0._CKS,0._CKS), (4._CKS,4._CKS), 4_IK, lopen = .true._LK, base = 10._CKS)")
145 call disp%show( getLogSpace((0._CKS,0._CKS), (4._CKS,4._CKS), 4_IK, lopen = .true._LK, base = 10._CKS) )
146 call disp%show("getLogSpace((0._CKS,0._CKS), (4._CKS,4._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKS)")
147 call disp%show( getLogSpace((0._CKS,0._CKS), (4._CKS,4._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKS) )
148 call disp%skip
149
150 ! Generate sequence in reverse.
151
152 call disp%skip
153 call disp%show("getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK)")
154 call disp%show( getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK) )
155 call disp%show("getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, base = 10._CKS)")
156 call disp%show( getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, base = 10._CKS) )
157 call disp%show("getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, fopen = .true._LK, base = 10._CKS)")
158 call disp%show( getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, fopen = .true._LK, base = 10._CKS) )
159 call disp%show("getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, lopen = .true._LK, base = 10._CKS)")
160 call disp%show( getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, lopen = .true._LK, base = 10._CKS) )
161 call disp%show("getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKS)")
162 call disp%show( getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKS) )
163 call disp%skip
164
165 call disp%skip
166 call disp%show("!%%%%%%%%%%%%%")
167 call disp%show("64-bit complex")
168 call disp%show("!%%%%%%%%%%%%%")
169 call disp%skip
170
171 call disp%skip
172 call disp%show("getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK)")
173 call disp%show( getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK) )
174 call disp%show("getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, base = 10._CKD)")
175 call disp%show( getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, base = 10._CKD) )
176 call disp%show("getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, fopen = .true._LK, base = 10._CKD)")
177 call disp%show( getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, fopen = .true._LK, base = 10._CKD) )
178 call disp%show("getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, lopen = .true._LK, base = 10._CKD)")
179 call disp%show( getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, lopen = .true._LK, base = 10._CKD) )
180 call disp%show("getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKD)")
181 call disp%show( getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKD) )
182 call disp%skip
183
184 ! Generate sequence in reverse.
185
186 call disp%skip
187 call disp%show("getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK)")
188 call disp%show( getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK) )
189 call disp%show("getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, base = 10._CKD)")
190 call disp%show( getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, base = 10._CKD) )
191 call disp%show("getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, fopen = .true._LK, base = 10._CKD)")
192 call disp%show( getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, fopen = .true._LK, base = 10._CKD) )
193 call disp%show("getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, lopen = .true._LK, base = 10._CKD)")
194 call disp%show( getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, lopen = .true._LK, base = 10._CKD) )
195 call disp%show("getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKD)")
196 call disp%show( getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKD) )
197 call disp%skip
198
199 call disp%skip
200 call disp%show("!%%%%%%%%%%%%%%")
201 call disp%show("128-bit complex")
202 call disp%show("!%%%%%%%%%%%%%%")
203 call disp%skip
204
205 call disp%skip
206 call disp%show("getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK)")
207 call disp%show( getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK) )
208 call disp%show("getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, base = 10._CKH)")
209 call disp%show( getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, base = 10._CKH) )
210 call disp%show("getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, fopen = .true._LK, base = 10._CKH)")
211 call disp%show( getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, fopen = .true._LK, base = 10._CKH) )
212 call disp%show("getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, lopen = .true._LK, base = 10._CKH)")
213 call disp%show( getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, lopen = .true._LK, base = 10._CKH) )
214 call disp%show("getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKH)")
215 call disp%show( getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKH) )
216 call disp%skip
217
218 ! Generate sequence in reverse.
219
220 call disp%skip
221 call disp%show("getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK)")
222 call disp%show( getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK) )
223 call disp%show("getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, base = 10._CKH)")
224 call disp%show( getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, base = 10._CKH) )
225 call disp%show("getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, fopen = .true._LK, base = 10._CKH)")
226 call disp%show( getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, fopen = .true._LK, base = 10._CKH) )
227 call disp%show("getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, lopen = .true._LK, base = 10._CKH)")
228 call disp%show( getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, lopen = .true._LK, base = 10._CKH) )
229 call disp%show("getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKH)")
230 call disp%show( getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKH) )
231 call disp%skip
232
233end program example
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 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 CKH
The scalar integer constant of intrinsic default kind, representing the highest-precision complex kin...
Definition: pm_kind.F90:843
integer, parameter CKS
The single-precision complex kind in Fortran mode. On most platforms, this is a 32-bit real kind.
Definition: pm_kind.F90:570
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 CKD
The double precision complex kind in Fortran mode. On most platforms, this is a 64-bit real kind.
Definition: pm_kind.F90:571
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!%%%%%%%%%%%%%%%%%%%%%%
3Generate real logspace.
4!%%%%%%%%%%%%%%%%%%%%%%
5!%%%%%%%%%%%%%%%%%%%%%%
6
7!%%%%%%%%%%
832-bit real
9!%%%%%%%%%%
10
11
12getLogSpace(0._RKS, 4._RKS, 4_IK)
13+1.00000000, +3.79366803, +14.3919172, +54.5981483
14getLogSpace(0._RKS, 4._RKS, 4_IK, base = 10._RKS)
15+1.00000000, +21.5443497, +464.158966, +10000.0000
16getLogSpace(0._RKS, 4._RKS, 4_IK, fopen = .true._LK, base = 10._RKS)
17+10.0000000, +100.000000, +1000.00000, +10000.0000
18getLogSpace(0._RKS, 4._RKS, 4_IK, lopen = .true._LK, base = 10._RKS)
19+1.00000000, +10.0000000, +100.000000, +1000.00000
20getLogSpace(0._RKS, 4._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKS)
21+3.16227770, +31.6227760, +316.227753, +3162.27759
22
23
24getLogSpace(4._RKS, 0._RKS, 4_IK)
25+54.5981483, +14.3919134, +3.79366755, +1.00000000
26getLogSpace(4._RKS, 0._RKS, 4_IK, base = 10._RKS)
27+10000.0000, +464.158722, +21.5443420, +1.00000000
28getLogSpace(4._RKS, 0._RKS, 4_IK, fopen = .true._LK, base = 10._RKS)
29+1000.00000, +100.000000, +10.0000000, +1.00000000
30getLogSpace(4._RKS, 0._RKS, 4_IK, lopen = .true._LK, base = 10._RKS)
31+10000.0000, +1000.00000, +100.000000, +10.0000000
32getLogSpace(4._RKS, 0._RKS, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKS)
33+3162.27759, +316.227753, +31.6227760, +3.16227770
34
35
36!%%%%%%%%%%
3764-bit real
38!%%%%%%%%%%
39
40
41getLogSpace(0._RKD, 4._RKD, 4_IK)
42+1.0000000000000000, +3.7936678946831774, +14.391916095149892, +54.598150033144236
43getLogSpace(0._RKD, 4._RKD, 4_IK, base = 10._RKD)
44+1.0000000000000000, +21.544346900318832, +464.15888336127773, +10000.000000000000
45getLogSpace(0._RKD, 4._RKD, 4_IK, fopen = .true._LK, base = 10._RKD)
46+10.000000000000000, +100.00000000000000, +1000.0000000000000, +10000.000000000000
47getLogSpace(0._RKD, 4._RKD, 4_IK, lopen = .true._LK, base = 10._RKD)
48+1.0000000000000000, +10.000000000000000, +100.00000000000000, +1000.0000000000000
49getLogSpace(0._RKD, 4._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKD)
50+3.1622776601683795, +31.622776601683793, +316.22776601683796, +3162.2776601683795
51
52
53getLogSpace(4._RKD, 0._RKD, 4_IK)
54+54.598150033144236, +14.391916095149899, +3.7936678946831783, +1.0000000000000000
55getLogSpace(4._RKD, 0._RKD, 4_IK, base = 10._RKD)
56+10000.000000000000, +464.15888336127819, +21.544346900318846, +1.0000000000000000
57getLogSpace(4._RKD, 0._RKD, 4_IK, fopen = .true._LK, base = 10._RKD)
58+1000.0000000000000, +100.00000000000000, +10.000000000000000, +1.0000000000000000
59getLogSpace(4._RKD, 0._RKD, 4_IK, lopen = .true._LK, base = 10._RKD)
60+10000.000000000000, +1000.0000000000000, +100.00000000000000, +10.000000000000000
61getLogSpace(4._RKD, 0._RKD, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKD)
62+3162.2776601683795, +316.22776601683796, +31.622776601683793, +3.1622776601683795
63
64
65!%%%%%%%%%%%
66128-bit real
67!%%%%%%%%%%%
68
69
70getLogSpace(0._RKH, 4._RKH, 4_IK)
71+1.00000000000000000000000000000000000, +3.79366789468317773539630436050516497, +14.3919160951498941178039062555425154, +54.5981500331442390781102612028608809
72getLogSpace(0._RKH, 4._RKH, 4_IK, base = 10._RKH)
73+1.00000000000000000000000000000000000, +21.5443469003188372175929356651935007, +464.158883361277889241007635091944523, +10000.0000000000000000000000000000000
74getLogSpace(0._RKH, 4._RKH, 4_IK, fopen = .true._LK, base = 10._RKH)
75+10.0000000000000000000000000000000000, +100.000000000000000000000000000000000, +1000.00000000000000000000000000000000, +10000.0000000000000000000000000000000
76getLogSpace(0._RKH, 4._RKH, 4_IK, lopen = .true._LK, base = 10._RKH)
77+1.00000000000000000000000000000000000, +10.0000000000000000000000000000000000, +100.000000000000000000000000000000000, +1000.00000000000000000000000000000000
78getLogSpace(0._RKH, 4._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKH)
79+3.16227766016837933199889354443271854, +31.6227766016837933199889354443271854, +316.227766016837933199889354443271860, +3162.27766016837933199889354443271840
80
81
82getLogSpace(4._RKH, 0._RKH, 4_IK)
83+54.5981500331442390781102612028608809, +14.3919160951498941178039062555425215, +3.79366789468317773539630436050516574, +1.00000000000000000000000000000000000
84getLogSpace(4._RKH, 0._RKH, 4_IK, base = 10._RKH)
85+10000.0000000000000000000000000000000, +464.158883361277889241007635091944917, +21.5443469003188372175929356651935130, +1.00000000000000000000000000000000000
86getLogSpace(4._RKH, 0._RKH, 4_IK, fopen = .true._LK, base = 10._RKH)
87+1000.00000000000000000000000000000000, +100.000000000000000000000000000000000, +10.0000000000000000000000000000000000, +1.00000000000000000000000000000000000
88getLogSpace(4._RKH, 0._RKH, 4_IK, lopen = .true._LK, base = 10._RKH)
89+10000.0000000000000000000000000000000, +1000.00000000000000000000000000000000, +100.000000000000000000000000000000000, +10.0000000000000000000000000000000000
90getLogSpace(4._RKH, 0._RKH, 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._RKH)
91+3162.27766016837933199889354443271840, +316.227766016837933199889354443271860, +31.6227766016837933199889354443271854, +3.16227766016837933199889354443271854
92
93
94!%%%%%%%%%%%%%%%%%%%%%%%%%
95!%%%%%%%%%%%%%%%%%%%%%%%%%
96Generate complex logspace.
97!%%%%%%%%%%%%%%%%%%%%%%%%%
98!%%%%%%%%%%%%%%%%%%%%%%%%%
99
100
101!%%%%%%%%%%%%%
10232-bit complex
103!%%%%%%%%%%%%%
104
105
106getLogSpace((1._CKS,1._CKS), (4._CKS,4._CKS), 4_IK)
107(+1.46869385, +2.28735518), (-3.07493234, +6.71884966), (-19.8845310, +2.83447099), (-35.6877289, -41.3200150)
108getLogSpace((1._CKS,1._CKS), (4._CKS,4._CKS), 4_IK, base = 10._CKS)
109(-6.68201542, +7.43980312), (-10.7013426, -99.4257660), (+811.214722, +584.748657), (-9770.96387, +2127.97827)
110getLogSpace((0._CKS,0._CKS), (4._CKS,4._CKS), 4_IK, fopen = .true._LK, base = 10._CKS)
111(-6.68201542, +7.43980312), (-10.7013426, -99.4257660), (+811.214722, +584.748657), (-9770.96387, +2127.97827)
112getLogSpace((0._CKS,0._CKS), (4._CKS,4._CKS), 4_IK, lopen = .true._LK, base = 10._CKS)
113(+1.00000000, +0.00000000), (-6.68201542, +7.43980312), (-10.7013426, -99.4257660), (+811.214722, +584.748657)
114getLogSpace((0._CKS,0._CKS), (4._CKS,4._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKS)
115(+1.28801882, +2.88808036), (-30.0933094, -9.71559143), (+273.366180, -158.968567), (-643.940369, +3096.01978)
116
117
118getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK)
119(-35.6877289, +41.3200150), (+0.892413497, -3.68720937), (+0.620079003E-1, +0.256200016), (-0.119719002E-1, -0.138613218E-1)
120getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, base = 10._CKS)
121(-9770.96387, -2127.97827), (-21.4893303, -1.53866231), (-0.462973453E-1, +0.331492419E-2), (-0.977096133E-4, +0.212797786E-4)
122getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, fopen = .true._LK, base = 10._CKS)
123(-10.7013426, +99.4257660), (+1.00000000, +0.00000000), (-0.107013423E-2, -0.994257536E-2), (-0.977096133E-4, +0.212797786E-4)
124getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, lopen = .true._LK, base = 10._CKS)
125(-9770.96387, -2127.97827), (-10.7013426, +99.4257660), (+1.00000000, +0.00000000), (-0.107013423E-2, -0.994257536E-2)
126getLogSpace((4._CKS,-4._CKS), (-4._CKS,+4._CKS), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKS)
127(+811.214722, -584.748657), (-6.68201542, -7.43980312), (-0.668201521E-1, +0.743980259E-1), (+0.811214559E-3, +0.584748515E-3)
128
129
130!%%%%%%%%%%%%%
13164-bit complex
132!%%%%%%%%%%%%%
133
134
135getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK)
136(+1.0000000000000000, +0.0000000000000000), (+0.89241322946273149, +3.6872096120277442), (-12.799113350909687, +6.5810292751514092), (-35.687732480119131, -41.320016184280199)
137getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, base = 10._CKD)
138(+1.0000000000000000, +0.0000000000000000), (-21.489332328145490, +1.5386615780603807), (+459.42392445767968, -66.129619982976592), (-9770.9622867323469, +2127.9793211529018)
139getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, fopen = .true._LK, base = 10._CKD)
140(-6.6820151019031329, +7.4398033695749310), (-10.701348355876982, -99.425756941379021), (+811.21465283970610, +584.74848184339612), (-9770.9622867323469, +2127.9793211529018)
141getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, lopen = .true._LK, base = 10._CKD)
142(+1.0000000000000000, +0.0000000000000000), (-6.6820151019031329, +7.4398033695749310), (-10.701348355876982, -99.425756941379021), (+811.21465283970610, +584.74848184339612)
143getLogSpace((0._CKD,0._CKD), (4._CKD,4._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKD)
144(+1.2880188077230994, +2.8880802535510623), (-30.093310326713034, -9.7155892039622227), (+273.36602736639816, -158.96859778558107), (-643.94081374776601, +3096.0200626594578)
145
146
147getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK)
148(-35.687732480119131, +41.320016184280199), (+0.89241322946273083, -3.6872096120277456), (+0.62007951099956576E-1, +0.25620004922557482), (-0.11971900521662590E-1, -0.13861321214152955E-1)
149getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, base = 10._CKD)
150(-9770.9622867323469, -2127.9793211529018), (-21.489332328145501, -1.5386615780603718), (-0.46297363033380279E-1, +0.33149458799925278E-2), (-0.97709622867323293E-4, +0.21279793211528979E-4)
151getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, fopen = .true._LK, base = 10._CKD)
152(-10.701348355876982, +99.425756941379021), (+1.0000000000000000, +0.0000000000000000), (-0.10701348355876973E-2, -0.99425756941378916E-2), (-0.97709622867323293E-4, +0.21279793211528979E-4)
153getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, lopen = .true._LK, base = 10._CKD)
154(-9770.9622867323469, -2127.9793211529018), (-10.701348355876982, +99.425756941379021), (+1.0000000000000000, +0.0000000000000000), (-0.10701348355876973E-2, -0.99425756941378916E-2)
155getLogSpace((4._CKD,-4._CKD), (-4._CKD,+4._CKD), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKD)
156(+811.21465283970610, -584.74848184339612), (-6.6820151019031329, -7.4398033695749310), (-0.66820151019031299E-1, +0.74398033695749280E-1), (+0.81121465283970503E-3, +0.58474848184339532E-3)
157
158
159!%%%%%%%%%%%%%%
160128-bit complex
161!%%%%%%%%%%%%%%
162
163
164getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK)
165(+1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000), (+0.892413229462731277425040840529798690, +3.68720961202774484328620605149881354), (-12.7991133509096911815909637775114086, +6.58102927515140845418525943409442629), (-35.6877324801191332990417139972871190, -41.3200161842802056970774483238470197)
166getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, base = 10._CKH)
167(+1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000), (-21.4893323281454840556173421890123814, +1.53866157806038661667621752314532881), (+459.423924457679330805379902128061207, -66.1296199829768247690351798309956726), (-9770.96228673233636876178613204470709, +2127.97932115290822526867517647758867)
168getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, fopen = .true._LK, base = 10._CKH)
169(-6.68201510190312946242330696656142377, +7.43980336957493187658416406875514362), (-10.7013483558770207720865175285182452, -99.4257569413789687361619371909155975), (+811.214652839705902013971782701663845, +584.748481843395154894261429590175230), (-9770.96228673233636876178613204470709, +2127.97932115290822526867517647758867)
170getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, lopen = .true._LK, base = 10._CKH)
171(+1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000), (-6.68201510190312946242330696656142377, +7.43980336957493187658416406875514362), (-10.7013483558770207720865175285182452, -99.4257569413789687361619371909155975), (+811.214652839705902013971782701663845, +584.748481843395154894261429590175230)
172getLogSpace((0._CKH,0._CKH), (4._CKH,4._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKH)
173(+1.28801880772309969743534705401557004, +2.88808025355106168164849546968240769), (-30.0933103267130276507566541305484520, -9.71558920396220997988032474265712857), (+273.366027366397729523842506149183534, -158.968597785581186217262923638309952), (-643.940813747764838905612522510823629, +3096.02006265945673923907800548861768)
174
175
176getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK)
177(-35.6877324801191332990417139972871190, +41.3200161842802056970774483238470197), (+0.892413229462731277425040840529798208, -3.68720961202774484328620605149881431), (+0.620079510999564822225351575123949535E-1, +0.256200049225574780070743677010013931), (-0.119719005216625907934578427957440421E-1, -0.138613212141529576938462541587188533E-1)
178getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, base = 10._CKH)
179(-9770.96228673233636876178613204470709, -2127.97932115290822526867517647758867), (-21.4893323281454840556173421890123906, -1.53866157806038661667621752314532130), (-0.462973630333802541090074742242052579E-1, +0.331494587999249809941556845516021446E-2), (-0.977096228673233636876178613204470924E-4, +0.212797932115290822526867517647758938E-4)
180getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, fopen = .true._LK, base = 10._CKH)
181(-10.7013483558770207720865175285182452, +99.4257569413789687361619371909155975), (+1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000), (-0.107013483558770207720865175285182464E-2, -0.994257569413789687361619371909156077E-2), (-0.977096228673233636876178613204470924E-4, +0.212797932115290822526867517647758938E-4)
182getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, lopen = .true._LK, base = 10._CKH)
183(-9770.96228673233636876178613204470709, -2127.97932115290822526867517647758867), (-10.7013483558770207720865175285182452, +99.4257569413789687361619371909155975), (+1.00000000000000000000000000000000000, +0.00000000000000000000000000000000000), (-0.107013483558770207720865175285182464E-2, -0.994257569413789687361619371909156077E-2)
184getLogSpace((4._CKH,-4._CKH), (-4._CKH,+4._CKH), 4_IK, fopen = .true._LK, lopen = .true._LK, base = 10._CKH)
185(+811.214652839705902013971782701663845, -584.748481843395154894261429590175230), (-6.68201510190312946242330696656142377, -7.43980336957493187658416406875514362), (-0.668201510190312946242330696656142353E-1, +0.743980336957493187658416406875514424E-1), (+0.811214652839705902013971782701664105E-3, +0.584748481843395154894261429590175425E-3)
186
187
Test:
test_pm_arraySpace
Todo:
Normal Priority: This generic interface can be expanded to include procedures with real-valued input argument space instead of count.


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, Tuesday 11:34 PM, August 10, 2021, Dallas, TX

Definition at line 538 of file pm_arraySpace.F90.


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