Skip to content

Commit ecee7a7

Browse files
committed
https://github.com/fortran-lang/stdlib/pull/420/files#r667540472
1 parent abf52e2 commit ecee7a7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/stdlib_math_linspace.fypp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ contains
3939

4040
interval = (end - start) / real((n - 1), ${k1}$)
4141

42-
do i = 1, n
42+
res(1) = start
43+
res(n) = end
44+
45+
do i = 2, n - 1
4346

4447
res(i) = real((i-1), ${k1}$) * interval + start
4548

0 commit comments

Comments
 (0)