summaryrefslogtreecommitdiff
path: root/gmp.texi
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>1999-05-25 16:34:00 +0200
committerLinus Nordberg <linus@nordberg.se>1999-05-25 16:34:00 +0200
commitef398aac7dad0648a7f6ab93025c34537e0a73c6 (patch)
tree1d7bdc95f5559f819dadfcb11c7f2a1eb088c2f9 /gmp.texi
parent2af9ab056a95d041ad5c45c9c4950571e33b9a38 (diff)
downloadgmp-ef398aac7dad0648a7f6ab93025c34537e0a73c6.tar.gz
Remove stupid __gmp_rand_init_common*() funcs.
Clean up gmp.h. Minor docu adds.
Diffstat (limited to 'gmp.texi')
-rw-r--r--gmp.texi13
1 files changed, 12 insertions, 1 deletions
diff --git a/gmp.texi b/gmp.texi
index cc312c3c2..093031d88 100644
--- a/gmp.texi
+++ b/gmp.texi
@@ -674,11 +674,22 @@ Initialize random state variable @var{state}.
Use one of
@itemize @minus
@item GMP_RAND_ALG_LC -- Linear congruental.
+
+A fast generator defined by @math{X = (aX + c) mod m}.
+
+a, c, and m are picked from a table where the modulus (m) is a power of
+2 and the multiplier is congruent to 5 (mod 8). The pick is based on
+parameter @var{size}. Schemes up to and including 128 bits have all
+passed the spectral test, as defined in [D. Knuth, "The Art of Computer
+Programming: Volume 2, Seminumerical Algorithms", Third Edition, Addison
+Wesley, 1998, p.93.]
+
@item GMP_RAND_ALG_BBS -- Blum, Blum, and Shub.
@end itemize
If @var{alg} is 0 or GMP_RAND_ALG_DEFAULT, the default algorithm is
-used.
+used. The default algorithm is typically a fast algorithm like the
+Linear Congruental.
@var{size} is the size of the largest good quality random number to be
generated, expressed in number of bits. If the random generation