diff options
Diffstat (limited to 'lib/libc/stdlib/random.3')
-rw-r--r-- | lib/libc/stdlib/random.3 | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3 index e1ab9e44da9..7b8a566115a 100644 --- a/lib/libc/stdlib/random.3 +++ b/lib/libc/stdlib/random.3 @@ -29,7 +29,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $OpenBSD: random.3,v 1.8 1999/06/29 18:36:23 aaron Exp $ +.\" $OpenBSD: random.3,v 1.9 1999/07/04 18:59:43 aaron Exp $ .\" .Dd April 19, 1991 .Dt RANDOM 3 @@ -56,9 +56,7 @@ The function 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 -.if t 2\u\s731\s10\d\(mi1. -.if n (2**31)\(mi1. +numbers in the range from 0 to (2**31)\-1. The maximum value returned by .Fn random is @@ -66,8 +64,7 @@ is (as defined by the header file .Aq Pa limits.h ) . 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). +16*((2**31)\-1. .Pp The .Fn random Ns / Fn srandom @@ -148,9 +145,7 @@ 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 -generator is greater than -.if t 2\u\s769\s10\d, -.if n 2**69 +generator is greater than 2**69 which should be sufficient for most purposes. .Sh AUTHOR Earl T. Cohen |