DADiSP Worksheet Functions > Function Categories > Generated Series > SEEDRAND
Sets the seed value for the random number generator.
SEEDRAND(value)
value |
- |
Optional. An integer used as the seed value. |
A string message indicating seed value has been set.
seedrand(4242)
The random number seed value is set to 1 on startup. Every random number is calculated in a deterministic way (using a standard formula) from the previous random number, except for the first random number which is calculated from the seed. To calculate the next random number, only the previous random number is used. The random numbers generated cannot be distinguished from actual random numbers by statistical methods. However, because the formula is deterministic, such random numbers are sometimes called pseudo-random numbers.
Since a seed value of 1 is always set on startup, all the random numbers are duplicated in every session. However, this pattern can vary by setting a new seed value. When the seed is reset with this function, all random numbers are henceforth calculated from the new seed.
SEEDRAND without an input argument sets the seed to a value determined by the current date and time.
SEEDRAND can be abbreviated SEED.