4.3BSD/usr/man/man3/random.3f

.\" Copyright (c) 1985 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)random.3f	6.1 (Berkeley) 5/15/85
.\"
.TH RANDOM 3F "May 15, 1985"
.UC 6
.SH NAME
random, drandm, irandm \- better random number generator
.SH SYNOPSIS
.B function irandm (iflag)
.sp 1
.B function random (iflag)
.sp 1
.B double precision function drandm (iflag)
.SH DESCRIPTION
These functions use
.IR random (3)
to generate sequences of random numbers, and
should be used rather than the older functions described in
.I man 3f rand.
If
.I iflag
is non-zero, it is used as a new seed for the random number
generator, and the first new random value is returned.
.PP
.I Irandm
returns positive integers in the range 0 through 2147483647 ( 2**31-1).
.I Random
and
.I drandm
return values in the range 0. through 1.0 by dividing the integer random number
from
.IR random (3)
by 2147483647 .
.SH FILES
.ie \nM /usr/ucb/lib/libF77.a
.el /usr/lib/libF77.a
.SH "SEE ALSO"
random(3)