@@ -218,14 +218,14 @@ contains
218218 if(scale % re == 0.0_${k1}$) then
219219 ti = scale % im * r1
220220 tr = 0.0_${k1}$
221- elseif (scale % im == 0.0_${k1}$) then
221+ else if (scale % im == 0.0_${k1}$) then
222222 tr = scale % re * r1
223223 ti = 0.0_${k1}$
224224 else
225225 tr = scale % re * r1
226226 r1 = unif_dist_rvs_0_r${k1}$( )
227227 ti = scale % im * r1
228- endif
228+ end if
229229 res = cmplx(tr, ti, kind=${k1}$)
230230 end function unif_dist_rvs_1_${t1[0]}$${k1}$
231231
@@ -253,14 +253,14 @@ contains
253253 if(scale % re == 0.0_${k1}$) then
254254 tr = loc % re
255255 ti = loc % im + scale % im * r1
256- elseif (scale % im == 0.0_${k1}$) then
256+ else if (scale % im == 0.0_${k1}$) then
257257 tr = loc % re + scale % re * r1
258258 ti = loc % im
259259 else
260260 tr = loc % re + scale % re * r1
261261 r1 = unif_dist_rvs_0_r${k1}$( )
262262 ti = loc % im + scale % im * r1
263- endif
263+ end if
264264 res = cmplx(tr, ti, kind=${k1}$)
265265 end function unif_dist_rvs_${t1[0]}$${k1}$
266266
@@ -323,7 +323,7 @@ contains
323323 tmp = shiftr(dist_rand(INT_ONE), 11)
324324 t = real(tmp * MESENNE_NUMBER, kind = ${k1}$)
325325 res(i) = loc + scale * t
326- enddo
326+ end do
327327 end function unif_dist_rvs_array_${t1[0]}$${k1}$
328328
329329 #:endfor
@@ -351,15 +351,15 @@ contains
351351 if(scale % re == 0.0_${k1}$) then
352352 tr = loc % re
353353 ti = loc % im + scale % im * r1
354- elseif (scale % im == 0.0_${k1}$) then
354+ else if (scale % im == 0.0_${k1}$) then
355355 tr = loc % re + scale % re * r1
356356 ti = loc % im
357357 else
358358 tr = loc % re + scale % re * r1
359359 tmp = shiftr(dist_rand(INT_ONE), 11)
360360 r1 = real(tmp * MESENNE_NUMBER, kind = ${k1}$)
361361 ti = loc % im + scale % im * r1
362- endif
362+ end if
363363 res(i) = cmplx(tr, ti, kind=${k1}$)
364364 end do
365365 end function unif_dist_rvs_array_${t1[0]}$${k1}$
@@ -376,7 +376,7 @@ contains
376376
377377 if(scale == 0_${k1}$) then
378378 res = 0.0
379- elseif (x < loc .or. x > (loc + scale)) then
379+ else if (x < loc .or. x > (loc + scale)) then
380380 res = 0.0
381381 else
382382 res = 1. / (scale + 1_${k1}$)
@@ -395,7 +395,7 @@ contains
395395
396396 if(scale == 0.0_${k1}$) then
397397 res = 0.0
398- elseif (x < loc .or. x > (loc + scale)) then
398+ else if (x < loc .or. x > (loc + scale)) then
399399 res = 0.0
400400 else
401401 res = 1.0 / scale
@@ -416,8 +416,8 @@ contains
416416 tr = loc % re + scale % re; ti = loc % im + scale % im
417417 if(scale == (0.0_${k1}$,0.0_${k1}$)) then
418418 res = 0.0
419- elseif ((x % re > loc % re .and. x % re < tr) .and. &
420- (x % im > loc % im .and. x % im < ti)) then
419+ else if ((x % re >= loc % re .and. x % re <= tr) .and. &
420+ (x % im >= loc % im .and. x % im <= ti)) then
421421 res = 1.0 / (scale % re * scale % im)
422422 else
423423 res = 0.0
@@ -436,9 +436,9 @@ contains
436436
437437 if(scale == 0_${k1}$) then
438438 res = 0.0
439- elseif (x < loc) then
439+ else if (x < loc) then
440440 res = 0.0
441- elseif (x >= loc .and. x <= (loc + scale)) then
441+ else if (x >= loc .and. x <= (loc + scale)) then
442442 res = real((x - loc + 1_${k1}$)) / real((scale + 1_${k1}$))
443443 else
444444 res = 1.0
@@ -457,9 +457,9 @@ contains
457457
458458 if(scale == 0.0_${k1}$) then
459459 res = 0.0
460- elseif (x < loc) then
460+ else if (x < loc) then
461461 res = 0.0
462- elseif (x >= loc .and. x <= (loc + scale)) then
462+ else if (x >= loc .and. x <= (loc + scale)) then
463463 res = (x - loc) / scale
464464 else
465465 res = 1.0
@@ -480,22 +480,22 @@ contains
480480 if(scale == (0.0_${k1}$,0.0_${k1}$)) then
481481 res = 0.0
482482 return
483- endif
483+ end if
484484 r1 = x % re < loc % re
485485 r2 = x % re > (loc % re + scale % re)
486486 i1 = x % im < loc % im
487487 i2 = x % im > (loc % im + scale % im)
488488 if(r1 .or. i1) then
489489 res = 0.0
490- elseif ((.not. r1) .and. (.not. r2) .and. i2) then
490+ else if ((.not. r1) .and. (.not. r2) .and. i2) then
491491 res = (x % re - loc % re) / scale % re
492- elseif ((.not. i1) .and. (.not. i2) .and. r2) then
492+ else if ((.not. i1) .and. (.not. i2) .and. r2) then
493493 res = (x % im - loc % im) / scale % im
494- elseif ((.not. r1) .and. (.not. r2) .and. (.not. i1) .and. (.not. i2)) &
495- then
496- res = (x % re - loc % re) * (x % im - loc % im) / &
494+ else if ((.not. r1) .and. (.not. r2) .and. (.not. i1) .and. (.not. i2)) &
495+ then
496+ res = (x % re - loc % re) * (x % im - loc % im) / &
497497 (scale % re * scale % im)
498- elseif (r2 .and. i2)then
498+ else if (r2 .and. i2)then
499499 res = 1.0
500500 end if
501501 end function unif_dist_cdf_${t1[0]}$${k1}$
0 commit comments