First page Back Continue Last page Overview Graphics
Random Number Generators
User specifies an initial value, or seed.
Initializing generator with same seed gives same sequence of "random" numbers.
For a different sequence, use a different seed.
One strategy is to use the current time, or the processor ID, to seed the generator.
- WARNING: this may have poor dynamic range, or may be correlated with when the code is run.