| 1 | .TH RAND 3 VAX-11 |
| 2 | .SH NAME |
| 3 | rand, srand \- random number generator |
| 4 | .SH SYNOPSIS |
| 5 | .B srand(seed) |
| 6 | .br |
| 7 | .B int seed; |
| 8 | .PP |
| 9 | .B rand( ) |
| 10 | .SH DESCRIPTION |
| 11 | .I Rand |
| 12 | uses a multiplicative congruential |
| 13 | random number generator |
| 14 | with period 2\u\s732\s0\d |
| 15 | to return successive pseudo-random |
| 16 | numbers in the range from 0 to 2\u\s731\s10\d\-1. |
| 17 | .PP |
| 18 | The generator is reinitialized by calling |
| 19 | .I srand |
| 20 | with 1 as argument. |
| 21 | It can be set to a random starting point by calling |
| 22 | .I srand |
| 23 | with whatever you like as argument. |