fts_load no longer has any return value
[unix-history] / usr / src / lib / libc / stdlib / random.3
index ad5e04e..23d5bbe 100644 (file)
@@ -1,9 +1,11 @@
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1983 The Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.\"    @(#)random.3    6.1 (Berkeley) %G%
+.\" %sccs.include.redist.man%
 .\"
 .\"
+.\"    @(#)random.3    6.4 (Berkeley) %G%
+.\"
+.UC 7
 .TH RANDOM 3 ""
 .UC 5
 .SH NAME
 .TH RANDOM 3 ""
 .UC 5
 .SH NAME
@@ -28,18 +30,22 @@ random, srandom, initstate, setstate \- better random number generator; routines
 .I Random
 uses a non-linear additive feedback random number generator employing a
 default table of size 31 long integers to return successive pseudo-random
 .I Random
 uses a non-linear additive feedback random number generator employing a
 default table of size 31 long integers to return successive pseudo-random
-numbers in the range from 0 to 2\u\s731\s10\d\-1.  The period of this
-random number generator is very large, approximately 16*(2\u\s731\s10\d\-1).
+numbers in the range from 0 to
+.if t 2\u\s731\s10\d\(mi1.
+.if n (2**31)\(mi1.
+The period of this random number generator is very large, approximately
+.if t 16\(mu(2\u\s731\s10\d\(mi1).
+.if n 16*((2**31)\(mi1).
 .PP
 .I Random/srandom
 have (almost) the same calling sequence and initialization properties as
 .I rand/srand.
 The difference is that
 .IR rand (3)
 .PP
 .I Random/srandom
 have (almost) the same calling sequence and initialization properties as
 .I rand/srand.
 The difference is that
 .IR rand (3)
-produces a much less random sequence -- in fact, the low dozen bits
+produces a much less random sequence \(em in fact, the low dozen bits
 generated by rand go through a cyclic pattern.  All the bits generated by
 .I random
 generated by rand go through a cyclic pattern.  All the bits generated by
 .I random
-are usable.  For example, \*(lqrandom()&01\*(rq will produce a random binary
+are usable.  For example, ``random()&01'' will produce a random binary
 value.
 .PP
 Unlike
 value.
 .PP
 Unlike
@@ -103,8 +109,10 @@ is that the size of the state array does not have to be remembered after
 it is initialized.
 .PP
 With 256 bytes of state information, the period of the random number
 it is initialized.
 .PP
 With 256 bytes of state information, the period of the random number
-generator is greater than 2\u\s769\s10\d, which should be sufficient for
-most purposes.
+generator is greater than
+.if t 2\u\s769\s10\d,
+.if n 2**69
+which should be sufficient for most purposes.
 .SH AUTHOR
 Earl T. Cohen
 .SH DIAGNOSTICS
 .SH AUTHOR
 Earl T. Cohen
 .SH DIAGNOSTICS