Skip to content

Commit 09483ae

Browse files
committed
fix: update documentation to reflect correct seed range
The seed for MT19937 must be a nonzero positive integer, as discussed in the original paper describing the Mersenne Twister PRNG. Closes: #1963
1 parent afb14b3 commit 09483ae

File tree

1 file changed

+3
-3
lines changed
  • lib/node_modules/@stdlib/random/base/mt19937

1 file changed

+3
-3
lines changed

lib/node_modules/@stdlib/random/base/mt19937/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ The function accepts the following `options`:
6060

6161
- **seed**: pseudorandom number generator seed.
6262
- **state**: a [`Uint32Array`][@stdlib/array/uint32] containing pseudorandom number generator state. If provided, the function ignores the `seed` option.
63-
- **copy**: `boolean` indicating whether to copy a provided pseudorandom number generator state. Setting this option to `false` allows sharing state between two or more pseudorandom number generators. Setting this option to `true` ensures that a returned generator has exclusive control over its internal state. Default: `true`.
63+
- **copy**: boolean indicating whether to copy a provided pseudorandom number generator state. Setting this option to `false` allows sharing state between two or more pseudorandom number generators. Setting this option to `true` ensures that a returned generator has exclusive control over its internal state. Default: `true`.
6464

65-
By default, a random integer is used to seed the returned generator. To seed the generator, provide either an `integer` on the interval `[0, 4294967295]`
65+
By default, a random integer is used to seed the returned generator. To seed the generator, provide either a nonzero integer on the interval `[1, 4294967295]`
6666

6767
```javascript
6868
var rand = mt19937.factory({
@@ -73,7 +73,7 @@ var r = rand();
7373
// returns 822569775
7474
```
7575

76-
or, for arbitrary length seeds, an array-like `object` containing unsigned 32-bit integers
76+
or, for arbitrary length seeds, an array-like object containing unsigned 32-bit integers
7777

7878
```javascript
7979
var Uint32Array = require( '@stdlib/array/uint32' );

0 commit comments

Comments
 (0)