@@ -115,7 +115,8 @@ contains
115115 #:elif k1 == "int64"
116116 ${t1}$, parameter :: ans(15) = [76, 45, 43, 75, 76, 15, 25, 24, 114, &
117117 113, 94, 29, 109, 93, 89]
118- #:elif t1[0] == "r" #! for real type
118+ #:elif t1[0] == "r"
119+ #! for real type
119120 ${t1}$, parameter :: ans(15) = &
120121 [0.914826628538749186958511927514337003_${k1}$, &
121122 0.367330098664966409049981166390352882_${k1}$, &
@@ -132,7 +133,8 @@ contains
132133 -0.901660046141515819639877804547722917_${k1}$, &
133134 -0.164090614147737401395943379611708224_${k1}$, &
134135 -0.333886718190384290672056977200554684_${k1}$]
135- #:else #! for complex type
136+ #:else
137+ #! for complex type
136138 ${t1}$, parameter :: ans(15) = &
137139 [(0.457413314269374593479255963757168502_${k1}$, &
138140 0.183665049332483204524990583195176441_${k1}$), &
@@ -169,11 +171,14 @@ contains
169171 print *, "Test rvs_uniform_${t1[0]}$${k1}$"
170172 seed = 258147369; k = 5
171173 call random_seed(seed, get)
172- #:if t1[0] == "i" #! for integer type
174+ #:if t1[0] == "i"
175+ #! for integer type
173176 loc = 15_${k1}$; scale = 100_${k1}$
174- #:elif t1[0] == "r" #! for real type
177+ #:elif t1[0] == "r"
178+ #! for real type
175179 loc = -1.0_${k1}$; scale = 2.0_${k1}$
176- #:else #! for complex type
180+ #:else
181+ #! for complex type
177182 loc = (-0.5_${k1}$,0.5_${k1}$); scale = (1.0_${k1}$, 1.0_${k1}$)
178183 #:endif
179184 do i = 1, 5
@@ -183,10 +188,12 @@ contains
183188 res(i) = uni_rvs(loc, scale) ! 2 dummies
184189 end do
185190 res(11:15) = uni_rvs(loc, scale, k) ! 3 dummies
186- #:if t1[0] == "i" #! for integer type
191+ #:if t1[0] == "i"
192+ #! for integer type
187193 call check(all(res == ans), &
188194 msg="rvs_uniform_${t1[0]}$${k1}$ failed", warn=warn)
189- #:else #! for real and complex types
195+ #:else
196+ #! for real and complex types
190197 call check(all(abs(res - ans) < ${k1}$tol), &
191198 msg="rvs_uniform_${t1[0]}$${k1}$ failed", warn=warn)
192199 #:endif
@@ -201,22 +208,28 @@ contains
201208 ${t1}$ :: x1, x2(3,4), loc, scale
202209 integer :: seed, get, i
203210 real :: res(3,5)
204- #:if t1[0] == "i" #! for integer type
211+ #:if t1[0] == "i"
212+ #! for integer type
205213 real, parameter :: ans(15) = [(1.96078438E-02, i=1,15)]
206- #:elif t1[0] == "r" #! for real type
214+ #:elif t1[0] == "r"
215+ #! for real type
207216 real, parameter :: ans(15) = [(0.5, i=1,15)]
208- #:else #! for complex type
217+ #:else
218+ #! for complex type
209219 real, parameter :: ans(15) = [(1.0, i=1,15)]
210220 #:endif
211221
212222 print *, "Test pdf_uniform_${t1[0]}$${k1}$"
213223 seed = 147258639
214224 call random_seed(seed, get)
215- #:if t1[0] == "i" #! for integer type
225+ #:if t1[0] == "i"
226+ #! for integer type
216227 loc = 0_${k1}$; scale = 50_${k1}$
217- #:elif t1[0] == "r" #! for real type
228+ #:elif t1[0] == "r"
229+ #! for real type
218230 loc = 0.0_${k1}$; scale = 2.0_${k1}$
219- #:else #! for complex type
231+ #:else
232+ #! for complex type
220233 loc = (-0.5_${k1}$, 0.5_${k1}$); scale = (1.0_${k1}$, 1.0_${k1}$)
221234 #:endif
222235 x1 = uni_rvs(loc, scale)
@@ -260,13 +273,15 @@ contains
260273 0.851485133, 0.623762369, 5.94059415E-02,&
261274 0.693069279, 0.544554472, 0.207920790, &
262275 0.306930691, 0.356435657, 0.128712878]
263- #:elif t1[0] == "r" #! for real type
276+ #:elif t1[0] == "r"
277+ #! for real type
264278 real, parameter :: ans(15) = [0.170192942, 0.170192942, 0.170192942, &
265279 0.276106149, 0.754930079, 0.406620681, &
266280 0.187742814, 0.651605546, 0.934733927, &
267281 0.151271492, 0.987674534, 0.130533904, &
268282 0.106271908, 9.27578658E-02, 0.203399420]
269- #:else #! for complex type
283+ #:else
284+ #! for complex type
270285 real, parameter :: ans(15) = [4.69913185E-02, 4.69913185E-02, &
271286 4.69913185E-02, 0.306970179, 0.122334257,&
272287 0.141398594, 0.128925011, 9.85755492E-03,&
@@ -278,11 +293,14 @@ contains
278293 print *, "Test cdf_uniform_${t1[0]}$${k1}$"
279294 seed = 369147258
280295 call random_seed(seed, get)
281- #:if t1[0] == "i" #! for integer type
296+ #:if t1[0] == "i"
297+ #! for integer type
282298 loc = 14_${k1}$; scale = 100_${k1}$
283- #:elif t1[0] == "r" #! for real type
299+ #:elif t1[0] == "r"
300+ #! for real type
284301 loc = 0.0_${k1}$; scale = 2.0_${k1}$
285- #:else #! for complex type
302+ #:else
303+ #! for complex type
286304 loc = (-0.5_${k1}$, -0.5_${k1}$); scale = (1.0_${k1}$, 1.0_${k1}$)
287305 #:endif
288306 x1 = uni_rvs(loc, scale)
0 commit comments