blob: a07a37fa909f56059a3f66a8afb7935dbcadd2f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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.
|