1RAND(3F)                                                              RAND(3F)
2
3
4

NAME

6       rand, drand, irand - return random values
7

SYNOPSIS

9       function irand (iflag)
10
11       function rand (iflag)
12
13       double precision function drand (iflag)
14

DESCRIPTION

16       The  newer  random(3f) should be used in new applications; rand remains
17       for compatibilty.
18
19       These functions use rand(3C) to generate sequences of  random  numbers.
20       If  iflag is '1', the generator is restarted and the first random value
21       is returned.  If iflag is otherwise non-zero, it is used as a new  seed
22       for  the  random  number  generator,  and the first new random value is
23       returned.
24
25       Irand returns positive integers in  the  range  0  through  2147483647.
26       Rand and drand return values in the range 0. through 1.0 .
27

FILES

29       /usr/lib/libF77.a
30

SEE ALSO

32       random(3F), rand(3C)
33

BUGS

35       The algorithm returns a 15 bit quantity on the PDP11; a 31 bit quantity
36       on the VAX.  Irand on the PDP11 calls rand(3C) twice to form a  31  bit
37       quantity, but bit 15 will always be 0.
38
39
40
414.2 Berkeley Distribution        May 15, 1985                         RAND(3F)
Impressum