BSD 4_3_Tahoe release
[unix-history] / usr / src / man / man3f / random.3
CommitLineData
53e9b2ee
KM
1.\" Copyright (c) 1985 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
95f51977 5.\" @(#)random.3f 6.1 (Berkeley) 5/15/85
53e9b2ee 6.\"
95f51977 7.TH RANDOM 3F "May 15, 1985"
53e9b2ee
KM
8.UC 6
9.SH NAME
10random, drandm, irandm \- better random number generator
11.SH SYNOPSIS
12.B function irandm (iflag)
13.sp 1
14.B function random (iflag)
15.sp 1
16.B double precision function drandm (iflag)
17.SH DESCRIPTION
18These functions use
19.IR random (3)
20to generate sequences of random numbers, and
21should be used rather than the older functions described in
22.I man 3f rand.
23If
24.I iflag
25is non-zero, it is used as a new seed for the random number
26generator, and the first new random value is returned.
27.PP
28.I Irandm
29returns positive integers in the range 0 through 2147483647 ( 2**31-1).
30.I Random
31and
32.I drandm
33return values in the range 0. through 1.0 by dividing the integer random number
34from
35.IR random (3)
36by 2147483647 .
37.SH FILES
38.ie \nM /usr/ucb/lib/libF77.a
39.el /usr/lib/libF77.a
40.SH "SEE ALSO"
41random(3)