[Python-checkins] python/nondist/sandbox/twister librandom.tex,1.5,1.6
rhettinger@users.sourceforge.net
rhettinger@users.sourceforge.net
Sun, 29 Dec 2002 13:55:58 -0800
Update of /cvsroot/python/python/nondist/sandbox/twister
In directory sc8-pr-cvs1:/tmp/cvs-serv12408
Modified Files:
librandom.tex
Log Message:
More small edits.
Index: librandom.tex
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/twister/librandom.tex,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** librandom.tex 29 Dec 2002 21:43:27 -0000 1.5
--- librandom.tex 29 Dec 2002 21:55:56 -0000 1.6
***************
*** 24,33 ****
the semi-open range [0.0, 1.0). Python uses the Mersenne Twister as
the core generator. It produces 53-bit precision floats and has a
! period of 2**19937-1. The underlying implementation is in C and
! is both fast and threadsafe. The Mersenne Twister has been extensively
! tested and passes tough benchmarks for randomness (such as the Diehard
! array of tests). However, being completely deterministic, it is not
! suitable for all purposes, and is completely unsuitable for cryptographic
! purposes.
The functions supplied by this module are actually bound methods of a
--- 24,32 ----
the semi-open range [0.0, 1.0). Python uses the Mersenne Twister as
the core generator. It produces 53-bit precision floats and has a
! period of 2**19937-1. The underlying implementation in C
! is both fast and threadsafe. The Mersenne Twister is one of the most
! extensively tested random number generators in existence. However, being
! completely deterministic, it is not suitable for all purposes, and is
! completely unsuitable for cryptographic purposes.
The functions supplied by this module are actually bound methods of a
***************
*** 45,51 ****
As an example of subclassing, the \module{random} module provides
! a \class{WichmannHill} class implementing an alternative generator
in pure Python. The class provides a backward compatible way to
! reproduce results from earlier versions on Python which used the
Wichmann-Hill algorithm as the core generator.
\versionchanged[Substituted MersenneTwister for Wichmann-Hill]{2.3}
--- 44,50 ----
As an example of subclassing, the \module{random} module provides
! the \class{WichmannHill} class which implements an alternative generator
in pure Python. The class provides a backward compatible way to
! reproduce results from earlier versions of Python which used the
Wichmann-Hill algorithm as the core generator.
\versionchanged[Substituted MersenneTwister for Wichmann-Hill]{2.3}
***************
*** 65,70 ****
\end{funcdesc}
-
-
\begin{funcdesc}{getstate}{}
Return an object capturing the current internal state of the
--- 64,67 ----
***************
*** 96,99 ****
--- 93,97 ----
\end{funcdesc}
+
Functions for integers:
***************
*** 235,239 ****
Class that implements the Wichmann-Hill algorithm as the core generator.
Has all of the same methods as \class{Random} plus the \method{whseed}
! method described below.
\end{classdesc}
--- 233,240 ----
Class that implements the Wichmann-Hill algorithm as the core generator.
Has all of the same methods as \class{Random} plus the \method{whseed}
! method described below. Because this class is implemented in pure
! Python, it is not threadsafe and may require locks between calls. The
! period of the generator is 6,953,607,871,644 which is small enough to
! require care that two independent random sequences do not overlap.
\end{classdesc}