Skip to content

Commit 55da7c0

Browse files
committed
Update arange doc: Fix some typos.
1 parent bac5e86 commit 55da7c0

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

doc/specs/stdlib_math.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,7 @@ Pure function.
287287

288288
### Description
289289

290-
Create a one-dimensional `array` of the `integer/real` type with fixed-spaced values of given spacing, within a given interval.
291-
292-
#### Note
293-
294-
Because of the `i` (`huge(integer :: i) = 2147483647`) index inside the `arange` function , the dimensional maximum length of array created by the `arange` function is `2147483647`.
290+
Creates a one-dimensional `array` of the `integer/real` type with fixed-spaced values of given spacing, within a given interval.
295291

296292
### Syntax
297293

@@ -315,11 +311,11 @@ The default `step` value is `1`.
315311

316312
#### Warning
317313
If `step = 0`, the `step` argument will be corrected to `1/1.0` by the internal process of the `arange` function.
318-
If `step < 0`, the `step` argument will be corrected to `abs(by)` by the internal process of the `arange` function.
314+
If `step < 0`, the `step` argument will be corrected to `abs(step)` by the internal process of the `arange` function.
319315

320316
### Return value
321317

322-
Return a one-dimensional `array` of fixed-spaced values.
318+
Returns a one-dimensional `array` of fixed-spaced values.
323319

324320
For `integer` type arguments, the length of the result vector is `(end - start)/step + 1`.
325321
For `real` type arguments, the length of the result vector is `floor((end - start)/step) + 1`.
@@ -342,8 +338,8 @@ program demo_math_arange
342338
343339
print *, (1.0,1.0)*arange(3) !! [(1.0,1.0),(2.0,2.0),[3.0,3.0]]
344340
345-
print *, arange(0.0,2.0,-2.0) !! [0.0,2.0]. Not recommended: `by` argument is negative!
346-
print *, arange(0.0,2.0,0.0) !! [0.0,1.0,2.0]. Not recommended: `by` argument is zero!
341+
print *, arange(0.0,2.0,-2.0) !! [0.0,2.0]. Not recommended: `step` argument is negative!
342+
print *, arange(0.0,2.0,0.0) !! [0.0,1.0,2.0]. Not recommended: `step` argument is zero!
347343
348344
end program demo_math_arange
349345
```

0 commit comments

Comments
 (0)