[Python-checkins] CVS: python/dist/src/Doc/lib libwhrandom.tex,1.10.4.1,1.10.4.2
Fred L. Drake
fdrake@weyr.cnri.reston.va.us
Mon, 28 Feb 2000 15:49:17 -0500 (EST)
Update of /projects/cvsroot/python/dist/src/Doc/lib
In directory weyr:/home/fdrake/projects/python/Doc-152p1/lib
Modified Files:
Tag: release152p1-patches
libwhrandom.tex
Log Message:
Partial improvement in response to comments from Jan Kim
<kim@mpiz-koeln.mpg.de>.
Index: libwhrandom.tex
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Doc/lib/libwhrandom.tex,v
retrieving revision 1.10.4.1
retrieving revision 1.10.4.2
diff -C2 -r1.10.4.1 -r1.10.4.2
*** libwhrandom.tex 2000/01/10 18:00:53 1.10.4.1
--- libwhrandom.tex 2000/02/28 20:49:14 1.10.4.2
***************
*** 12,20 ****
following method, specific to the Wichmann-Hill algorithm:
! \begin{funcdesc}{seed}{x, y, z}
Initializes the random number generator from the integers \var{x},
\var{y} and \var{z}. When the module is first imported, the random
number is initialized using values derived from the current time.
! \end{funcdesc}
--- 12,26 ----
following method, specific to the Wichmann-Hill algorithm:
! \begin{methoddesc}[whrandom]{seed}{\optional{x, y, z}}
Initializes the random number generator from the integers \var{x},
\var{y} and \var{z}. When the module is first imported, the random
number is initialized using values derived from the current time.
! If \var{x}, \var{y}, and \var{z} are either omitted or \code{0}, the
! seed will be computed from the current system time. If one or two
! of the parameters are \code{0}, but not all three, the zero values
! are replaced by ones. This causes some appearantly different seeds
! to be equal, with the corresponding result on the pseudo-random
! series produced by the generator.
! \end{methoddesc}
***************
*** 23,26 ****
--- 29,33 ----
available at the module level. Therefore one can write either
\code{N = whrandom.random()} or:
+
\begin{verbatim}
generator = whrandom.whrandom()
***************
*** 28,31 ****
--- 35,40 ----
\end{verbatim}
+ Note that using separate instances of the generator leads to
+ independent sequences of pseudo-random numbers.
\begin{seealso}