Usage
seed(r, s)
Signature
seed: (%, MachineInteger) %
Parameter | Type | Description |
---|---|---|
r | % | a pseudo-random number generator |
s | MachineInteger | a nonzero seed |
Description
Sets the seed of r to s and returns s. This is useful when a reproducible pseudo-random sequence is desired. If an unseeded generator is called, then it seeds itself from the system clock the first time it is used, so the sequence is not reproducible. Note that setting the seed to 0 causes the generator to generate an infinite sequence of 0.