4.1cBSD/usr/man/man3/rand.3f

.TH RAND 3F "19 January 1983"
.SH NAME
rand, drand, irand \- return random values
.SH SYNOPSIS
.B function irand (iflag)
.sp 1
.B function rand (iflag)
.sp 1
.B double precision function drand (iflag)
.SH DESCRIPTION
These functions use
.IR rand (3)
to generate sequences of random numbers.
If
.I iflag
is '1', the generator is restarted and the first random value is returned.
If
.I iflag
is otherwise non-zero, it is used as a new seed for the random number
generator, and the first new random value is returned.
.PP
.I Irand
returns positive integers in the range 0 through 2147483647.
.I Rand
and
.I drand
return values in the range 0. through 1.0 .
.SH FILES
.ie \nM /usr/ucb/lib/libF77.a
.el /usr/lib/libF77.a
.SH "SEE ALSO"
rand(3)
.SH BUGS
The algorithm returns a 15 bit quantity on the PDP11; a 31 bit quantity
on the VAX.
.I Irand
on the PDP11 calls
.IR rand (3)
twice to form a 31 bit quantity, but bit 15 will always be 0.
.LP
But what does it do on the Sun ????????????????