Commit | Line | Data |
---|---|---|
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 | |
10 | random, 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 | |
18 | These functions use | |
19 | .IR random (3) | |
20 | to generate sequences of random numbers, and | |
21 | should be used rather than the older functions described in | |
22 | .I man 3f rand. | |
23 | If | |
24 | .I iflag | |
25 | is non-zero, it is used as a new seed for the random number | |
26 | generator, and the first new random value is returned. | |
27 | .PP | |
28 | .I Irandm | |
29 | returns positive integers in the range 0 through 2147483647 ( 2**31-1). | |
30 | .I Random | |
31 | and | |
32 | .I drandm | |
33 | return values in the range 0. through 1.0 by dividing the integer random number | |
34 | from | |
35 | .IR random (3) | |
36 | by 2147483647 . | |
37 | .SH FILES | |
38 | .ie \nM /usr/ucb/lib/libF77.a | |
39 | .el /usr/lib/libF77.a | |
40 | .SH "SEE ALSO" | |
41 | random(3) |