diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-22 20:52:35 +0000 |
| commit | 46439007cf417cbd9ac8049bb4122c890097a0fa (patch) | |
| tree | 6fdb25e5f3a2b6d5657eb23b35774b631d4d97e4 /man/2/rand | |
| parent | 37da2899f40661e3e9631e497da8dc59b971cbd0 (diff) | |
20060303-partial
Diffstat (limited to 'man/2/rand')
| -rw-r--r-- | man/2/rand | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/man/2/rand b/man/2/rand new file mode 100644 index 00000000..a07a37fa --- /dev/null +++ b/man/2/rand @@ -0,0 +1,35 @@ +.TH RAND 2 +.SH NAME +rand \- pseudo random number generation +.SH SYNOPSIS +.EX +include "rand.m"; +rand = load Rand Rand->PATH; + +init: fn(seed: int); +rand: fn(modulus: int): int; +bigrand: fn(modulus: big): big; +.EE +.SH DESCRIPTION +.B Init +initialises the pseudo-random number generator +with +.IR seed ; +subsequent calls to +.B rand +and +.B bigrand +return a pseudo-random sequence of integers +or bigs respectively, between 0 and +.IR modulus \-1. +.I Modulus +should be a non-negative integer; +for +.BR bigrand , +it should be less than 2^53. +.SH SOURCE +.B /appl/lib/rand.b +.SH SEE ALSO +.IR security-random (2) +.SH BUGS +The quality of the algorithm currently used is questionable. |
