2.9BSD/usr/man/cat3/rand.3

Compare this file to the similar file:
Show the results in this format:


RAND(3)             UNIX Programmer's Manual              RAND(3)

NAME
     rand, srand - random number generator

SYNOPSIS
     srand(seed)
     unsigned seed;

     rand( )

DESCRIPTION
     _R_a_n_d uses a multiplicative congruential random number gen-
     erator with period 28329 to return successive pseudo-random
     numbers in the range from 0 to 28159-1.

     The generator is reinitialized by calling _s_r_a_n_d with 1 as
     argument.  It can be set to a random starting point by cal-
     ling _s_r_a_n_d with whatever you like as argument.

Printed 6/4/83                                                  1