Skip to content

Commit b66a7b3

Browse files
authored
Replace merge(n, 0, n > 0) by max(n, 0)
1 parent a0d2a03 commit b66a7b3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: src/stdlib_math_logspace.fypp

+6-6
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@ contains
4343
#:for k1, t1 in RC_KINDS_TYPES
4444
#:set RName = rname("logspace", 1, t1, k1, "n_rbase")
4545
module procedure ${RName}$
46-
${t1}$ :: exponents(merge(n, 0, n > 0))
46+
${t1}$ :: exponents(max(n, 0))
4747
exponents = linspace(start, end, n)
4848
res = base ** exponents
4949
end procedure
5050

5151
#:set RName = rname("logspace", 1, t1, k1, "n_cbase")
5252
module procedure ${RName}$
53-
${t1}$ :: exponents(merge(n, 0, n > 0))
53+
${t1}$ :: exponents(max(n, 0))
5454
exponents = linspace(start, end, n)
5555
res = base ** exponents
5656
end procedure
5757

5858
#:set RName = rname("logspace", 1, t1, k1, "n_ibase")
5959
module procedure ${RName}$
60-
${t1}$ :: exponents(merge(n, 0, n > 0))
60+
${t1}$ :: exponents(max(n, 0))
6161
exponents = linspace(start, end, n)
6262
res = base ** exponents
6363
end procedure
@@ -69,22 +69,22 @@ contains
6969
#:for k1 in REAL_KINDS
7070
#:set RName = rname("logspace", 1, "integer(int32)", "int32", "n_r" + str(k1) + "base")
7171
module procedure ${RName}$
72-
integer :: exponents(merge(n, 0, n > 0))
72+
integer :: exponents(max(n, 0))
7373
exponents = linspace(start, end, n)
7474
res = base ** exponents
7575
end procedure
7676

7777
#:set RName = rname("logspace", 1, "integer(int32)", "int32", "n_c" + str(k1) + "base")
7878
module procedure ${RName}$
79-
integer :: exponents(merge(n, 0, n > 0))
79+
integer :: exponents(max(n, 0))
8080
exponents = linspace(start, end, n)
8181
res = base ** exponents
8282
end procedure
8383
#:endfor
8484

8585
#:set RName = rname("logspace", 1, "integer(int32)", "int32", "n_ibase")
8686
module procedure ${RName}$
87-
integer :: exponents(merge(n, 0, n > 0))
87+
integer :: exponents(max(n, 0))
8888
exponents = linspace(start, end, n)
8989
res = base ** exponents
9090
end procedure

0 commit comments

Comments
 (0)