Fred Drake | 295da24 | 1998-08-10 19:42:37 +0000 | [diff] [blame] | 1 | \section{\module{random} --- |
Fred Drake | 048b75b | 1999-04-21 18:14:22 +0000 | [diff] [blame] | 2 | Generate pseudo-random numbers} |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 3 | |
Fred Drake | 048b75b | 1999-04-21 18:14:22 +0000 | [diff] [blame] | 4 | \declaremodule{standard}{random} |
Fred Drake | 295da24 | 1998-08-10 19:42:37 +0000 | [diff] [blame] | 5 | \modulesynopsis{Generate pseudo-random numbers with various common |
Fred Drake | 048b75b | 1999-04-21 18:14:22 +0000 | [diff] [blame] | 6 | distributions.} |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 7 | |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 8 | |
| 9 | This module implements pseudo-random number generators for various |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 10 | distributions. |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 11 | |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 12 | For integers, uniform selection from a range. |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 13 | For sequences, uniform selection of a random element, a function to |
| 14 | generate a random permutation of a list in-place, and a function for |
| 15 | random sampling without replacement. |
| 16 | |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 17 | On the real line, there are functions to compute uniform, normal (Gaussian), |
| 18 | lognormal, negative exponential, gamma, and beta distributions. |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 19 | For generating distributions of angles, the von Mises distribution |
| 20 | is available. |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 21 | |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 22 | Almost all module functions depend on the basic function |
| 23 | \function{random()}, which generates a random float uniformly in |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 24 | the semi-open range [0.0, 1.0). Python uses the Mersenne Twister as |
| 25 | the core generator. It produces 53-bit precision floats and has a |
| 26 | period of 2**19937-1. The underlying implementation in C |
| 27 | is both fast and threadsafe. The Mersenne Twister is one of the most |
| 28 | extensively tested random number generators in existence. However, being |
| 29 | completely deterministic, it is not suitable for all purposes, and is |
| 30 | completely unsuitable for cryptographic purposes. |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 31 | |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 32 | The functions supplied by this module are actually bound methods of a |
Fred Drake | 844bd5b | 2001-02-02 02:42:31 +0000 | [diff] [blame] | 33 | hidden instance of the \class{random.Random} class. You can |
| 34 | instantiate your own instances of \class{Random} to get generators |
| 35 | that don't share state. This is especially useful for multi-threaded |
| 36 | programs, creating a different instance of \class{Random} for each |
| 37 | thread, and using the \method{jumpahead()} method to ensure that the |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 38 | generated sequences seen by each thread don't overlap. |
Fred Drake | 844bd5b | 2001-02-02 02:42:31 +0000 | [diff] [blame] | 39 | |
| 40 | Class \class{Random} can also be subclassed if you want to use a |
| 41 | different basic generator of your own devising: in that case, override |
| 42 | the \method{random()}, \method{seed()}, \method{getstate()}, |
Tim Peters | d52269b | 2001-01-25 06:23:18 +0000 | [diff] [blame] | 43 | \method{setstate()} and \method{jumpahead()} methods. |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 44 | |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 45 | As an example of subclassing, the \module{random} module provides |
| 46 | the \class{WichmannHill} class which implements an alternative generator |
| 47 | in pure Python. The class provides a backward compatible way to |
| 48 | reproduce results from earlier versions of Python which used the |
| 49 | Wichmann-Hill algorithm as the core generator. |
| 50 | \versionchanged[Substituted MersenneTwister for Wichmann-Hill]{2.3} |
Tim Peters | e360d95 | 2001-01-26 10:00:39 +0000 | [diff] [blame] | 51 | |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 52 | |
| 53 | Bookkeeping functions: |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 54 | |
| 55 | \begin{funcdesc}{seed}{\optional{x}} |
| 56 | Initialize the basic random number generator. |
Tim Peters | 0de88fc | 2001-02-01 04:59:18 +0000 | [diff] [blame] | 57 | Optional argument \var{x} can be any hashable object. |
Fred Drake | 4cacec5 | 2001-04-21 05:56:06 +0000 | [diff] [blame] | 58 | If \var{x} is omitted or \code{None}, current system time is used; |
Tim Peters | 0de88fc | 2001-02-01 04:59:18 +0000 | [diff] [blame] | 59 | current system time is also used to initialize the generator when the |
| 60 | module is first imported. |
Fred Drake | 4cacec5 | 2001-04-21 05:56:06 +0000 | [diff] [blame] | 61 | If \var{x} is not \code{None} or an int or long, |
Fred Drake | d0946da | 2001-02-01 15:53:24 +0000 | [diff] [blame] | 62 | \code{hash(\var{x})} is used instead. |
Tim Peters | 0de88fc | 2001-02-01 04:59:18 +0000 | [diff] [blame] | 63 | If \var{x} is an int or long, \var{x} is used directly. |
Barry Warsaw | 8312577 | 2001-01-25 00:39:16 +0000 | [diff] [blame] | 64 | \end{funcdesc} |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 65 | |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 66 | \begin{funcdesc}{getstate}{} |
Fred Drake | 844bd5b | 2001-02-02 02:42:31 +0000 | [diff] [blame] | 67 | Return an object capturing the current internal state of the |
| 68 | generator. This object can be passed to \function{setstate()} to |
| 69 | restore the state. |
Tim Peters | 0de88fc | 2001-02-01 04:59:18 +0000 | [diff] [blame] | 70 | \versionadded{2.1} |
| 71 | \end{funcdesc} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 72 | |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 73 | \begin{funcdesc}{setstate}{state} |
| 74 | \var{state} should have been obtained from a previous call to |
Fred Drake | 844bd5b | 2001-02-02 02:42:31 +0000 | [diff] [blame] | 75 | \function{getstate()}, and \function{setstate()} restores the |
| 76 | internal state of the generator to what it was at the time |
| 77 | \function{setstate()} was called. |
Tim Peters | 0de88fc | 2001-02-01 04:59:18 +0000 | [diff] [blame] | 78 | \versionadded{2.1} |
Fred Drake | 844bd5b | 2001-02-02 02:42:31 +0000 | [diff] [blame] | 79 | \end{funcdesc} |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 80 | |
Tim Peters | d52269b | 2001-01-25 06:23:18 +0000 | [diff] [blame] | 81 | \begin{funcdesc}{jumpahead}{n} |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 82 | Change the internal state to one different from and likely far away from |
| 83 | the current state. \var{n} is a non-negative integer which is used to |
| 84 | scramble the current state vector. This is most useful in multi-threaded |
Fred Drake | 4cacec5 | 2001-04-21 05:56:06 +0000 | [diff] [blame] | 85 | programs, in conjuction with multiple instances of the \class{Random} |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 86 | class: \method{setstate()} or \method{seed()} can be used to force all |
| 87 | instances into the same internal state, and then \method{jumpahead()} |
| 88 | can be used to force the instances' states far apart. |
Tim Peters | 0de88fc | 2001-02-01 04:59:18 +0000 | [diff] [blame] | 89 | \versionadded{2.1} |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 90 | \versionchanged[Instead of jumping to a specific state, \var{n} steps |
| 91 | ahead, \method{jumpahead(\var{n})} jumps to another state likely to be |
| 92 | separated by many steps.]{2.3} |
Tim Peters | d52269b | 2001-01-25 06:23:18 +0000 | [diff] [blame] | 93 | \end{funcdesc} |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 94 | |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 95 | |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 96 | Functions for integers: |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 97 | |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 98 | \begin{funcdesc}{randrange}{\optional{start,} stop\optional{, step}} |
| 99 | Return a randomly selected element from \code{range(\var{start}, |
| 100 | \var{stop}, \var{step})}. This is equivalent to |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 101 | \code{choice(range(\var{start}, \var{stop}, \var{step}))}, |
| 102 | but doesn't actually build a range object. |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 103 | \versionadded{1.5.2} |
| 104 | \end{funcdesc} |
| 105 | |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 106 | \begin{funcdesc}{randint}{a, b} |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 107 | Return a random integer \var{N} such that |
| 108 | \code{\var{a} <= \var{N} <= \var{b}}. |
| 109 | \end{funcdesc} |
| 110 | |
| 111 | |
| 112 | Functions for sequences: |
| 113 | |
| 114 | \begin{funcdesc}{choice}{seq} |
| 115 | Return a random element from the non-empty sequence \var{seq}. |
| 116 | \end{funcdesc} |
| 117 | |
| 118 | \begin{funcdesc}{shuffle}{x\optional{, random}} |
| 119 | Shuffle the sequence \var{x} in place. |
| 120 | The optional argument \var{random} is a 0-argument function |
| 121 | returning a random float in [0.0, 1.0); by default, this is the |
| 122 | function \function{random()}. |
| 123 | |
| 124 | Note that for even rather small \code{len(\var{x})}, the total |
| 125 | number of permutations of \var{x} is larger than the period of most |
| 126 | random number generators; this implies that most permutations of a |
| 127 | long sequence can never be generated. |
| 128 | \end{funcdesc} |
| 129 | |
Raymond Hettinger | f24eb35 | 2002-11-12 17:41:57 +0000 | [diff] [blame] | 130 | \begin{funcdesc}{sample}{population, k} |
| 131 | Return a \var{k} length list of unique elements chosen from the |
| 132 | population sequence. Used for random sampling without replacement. |
Raymond Hettinger | f24eb35 | 2002-11-12 17:41:57 +0000 | [diff] [blame] | 133 | \versionadded{2.3} |
Raymond Hettinger | 311f419 | 2002-11-18 09:01:24 +0000 | [diff] [blame] | 134 | |
| 135 | Returns a new list containing elements from the population while |
| 136 | leaving the original population unchanged. The resulting list is |
| 137 | in selection order so that all sub-slices will also be valid random |
| 138 | samples. This allows raffle winners (the sample) to be partitioned |
| 139 | into grand prize and second place winners (the subslices). |
| 140 | |
| 141 | Members of the population need not be hashable or unique. If the |
| 142 | population contains repeats, then each occurrence is a possible |
| 143 | selection in the sample. |
| 144 | |
| 145 | To choose a sample from a range of integers, use \function{xrange} |
| 146 | as an argument. This is especially fast and space efficient for |
| 147 | sampling from a large population: \code{sample(xrange(10000000), 60)}. |
Raymond Hettinger | f24eb35 | 2002-11-12 17:41:57 +0000 | [diff] [blame] | 148 | \end{funcdesc} |
| 149 | |
Tim Peters | d7b5e88 | 2001-01-25 03:36:26 +0000 | [diff] [blame] | 150 | |
| 151 | The following functions generate specific real-valued distributions. |
| 152 | Function parameters are named after the corresponding variables in the |
| 153 | distribution's equation, as used in common mathematical practice; most of |
| 154 | these equations can be found in any statistics text. |
| 155 | |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 156 | \begin{funcdesc}{random}{} |
| 157 | Return the next random floating point number in the range [0.0, 1.0). |
| 158 | \end{funcdesc} |
| 159 | |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 160 | \begin{funcdesc}{uniform}{a, b} |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 161 | Return a random real number \var{N} such that |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 162 | \code{\var{a} <= \var{N} < \var{b}}. |
| 163 | \end{funcdesc} |
Fred Drake | 38e5d27 | 2000-04-03 20:13:55 +0000 | [diff] [blame] | 164 | |
Fred Drake | 2eda4ca | 1998-03-08 08:13:53 +0000 | [diff] [blame] | 165 | \begin{funcdesc}{betavariate}{alpha, beta} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 166 | Beta distribution. Conditions on the parameters are |
| 167 | \code{\var{alpha} > -1} and \code{\var{beta} > -1}. |
| 168 | Returned values range between 0 and 1. |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 169 | \end{funcdesc} |
| 170 | |
Fred Drake | 2eda4ca | 1998-03-08 08:13:53 +0000 | [diff] [blame] | 171 | \begin{funcdesc}{cunifvariate}{mean, arc} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 172 | Circular uniform distribution. \var{mean} is the mean angle, and |
| 173 | \var{arc} is the range of the distribution, centered around the mean |
| 174 | angle. Both values must be expressed in radians, and can range |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 175 | between 0 and \emph{pi}. Returned values range between |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 176 | \code{\var{mean} - \var{arc}/2} and \code{\var{mean} + |
Raymond Hettinger | c32f033 | 2002-05-23 19:44:49 +0000 | [diff] [blame] | 177 | \var{arc}/2} and are normalized to between 0 and \emph{pi}. |
| 178 | |
Fred Drake | 92bf9da | 2002-05-23 21:07:19 +0000 | [diff] [blame] | 179 | \deprecated{2.3}{Instead, use \code{(\var{mean} + \var{arc} * |
| 180 | (random.random() - 0.5)) \% math.pi}.} |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 181 | \end{funcdesc} |
| 182 | |
| 183 | \begin{funcdesc}{expovariate}{lambd} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 184 | Exponential distribution. \var{lambd} is 1.0 divided by the desired |
| 185 | mean. (The parameter would be called ``lambda'', but that is a |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 186 | reserved word in Python.) Returned values range from 0 to |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 187 | positive infinity. |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 188 | \end{funcdesc} |
| 189 | |
Raymond Hettinger | 5359ad6 | 2002-05-13 22:40:38 +0000 | [diff] [blame] | 190 | \begin{funcdesc}{gammavariate}{alpha, beta} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 191 | Gamma distribution. (\emph{Not} the gamma function!) Conditions on |
Raymond Hettinger | 576474c | 2002-05-13 23:49:13 +0000 | [diff] [blame] | 192 | the parameters are \code{\var{alpha} > 0} and \code{\var{beta} > 0}. |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 193 | \end{funcdesc} |
| 194 | |
Fred Drake | 2eda4ca | 1998-03-08 08:13:53 +0000 | [diff] [blame] | 195 | \begin{funcdesc}{gauss}{mu, sigma} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 196 | Gaussian distribution. \var{mu} is the mean, and \var{sigma} is the |
| 197 | standard deviation. This is slightly faster than the |
| 198 | \function{normalvariate()} function defined below. |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 199 | \end{funcdesc} |
| 200 | |
Fred Drake | 2eda4ca | 1998-03-08 08:13:53 +0000 | [diff] [blame] | 201 | \begin{funcdesc}{lognormvariate}{mu, sigma} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 202 | Log normal distribution. If you take the natural logarithm of this |
| 203 | distribution, you'll get a normal distribution with mean \var{mu} |
| 204 | and standard deviation \var{sigma}. \var{mu} can have any value, |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 205 | and \var{sigma} must be greater than zero. |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 206 | \end{funcdesc} |
| 207 | |
Fred Drake | 2eda4ca | 1998-03-08 08:13:53 +0000 | [diff] [blame] | 208 | \begin{funcdesc}{normalvariate}{mu, sigma} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 209 | Normal distribution. \var{mu} is the mean, and \var{sigma} is the |
| 210 | standard deviation. |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 211 | \end{funcdesc} |
| 212 | |
Fred Drake | 2eda4ca | 1998-03-08 08:13:53 +0000 | [diff] [blame] | 213 | \begin{funcdesc}{vonmisesvariate}{mu, kappa} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 214 | \var{mu} is the mean angle, expressed in radians between 0 and |
| 215 | 2*\emph{pi}, and \var{kappa} is the concentration parameter, which |
| 216 | must be greater than or equal to zero. If \var{kappa} is equal to |
| 217 | zero, this distribution reduces to a uniform random angle over the |
| 218 | range 0 to 2*\emph{pi}. |
Guido van Rossum | 571391b | 1997-04-03 22:41:49 +0000 | [diff] [blame] | 219 | \end{funcdesc} |
Guido van Rossum | e47da0a | 1997-07-17 16:34:52 +0000 | [diff] [blame] | 220 | |
Guido van Rossum | 4f80b65 | 1997-12-30 17:38:05 +0000 | [diff] [blame] | 221 | \begin{funcdesc}{paretovariate}{alpha} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 222 | Pareto distribution. \var{alpha} is the shape parameter. |
Guido van Rossum | 4f80b65 | 1997-12-30 17:38:05 +0000 | [diff] [blame] | 223 | \end{funcdesc} |
| 224 | |
| 225 | \begin{funcdesc}{weibullvariate}{alpha, beta} |
Fred Drake | 5f0decf | 2001-01-22 18:18:30 +0000 | [diff] [blame] | 226 | Weibull distribution. \var{alpha} is the scale parameter and |
| 227 | \var{beta} is the shape parameter. |
Guido van Rossum | 4f80b65 | 1997-12-30 17:38:05 +0000 | [diff] [blame] | 228 | \end{funcdesc} |
Guido van Rossum | e47da0a | 1997-07-17 16:34:52 +0000 | [diff] [blame] | 229 | |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 230 | Alternative Generator |
| 231 | |
| 232 | \begin{classdesc}{WichmannHill}{\optional{seed}} |
| 233 | Class that implements the Wichmann-Hill algorithm as the core generator. |
| 234 | Has all of the same methods as \class{Random} plus the \method{whseed} |
| 235 | method described below. Because this class is implemented in pure |
| 236 | Python, it is not threadsafe and may require locks between calls. The |
| 237 | period of the generator is 6,953,607,871,644 which is small enough to |
| 238 | require care that two independent random sequences do not overlap. |
| 239 | \end{classdesc} |
| 240 | |
| 241 | \begin{funcdesc}{whseed}{\optional{x}} |
| 242 | This is obsolete, supplied for bit-level compatibility with versions |
| 243 | of Python prior to 2.1. |
| 244 | See \function{seed} for details. \function{whseed} does not guarantee |
| 245 | that distinct integer arguments yield distinct internal states, and can |
| 246 | yield no more than about 2**24 distinct internal states in all. |
| 247 | \end{funcdesc} |
Fred Drake | 065cba1 | 2000-12-15 19:07:17 +0000 | [diff] [blame] | 248 | |
Guido van Rossum | e47da0a | 1997-07-17 16:34:52 +0000 | [diff] [blame] | 249 | \begin{seealso} |
Raymond Hettinger | 40f6217 | 2002-12-29 23:03:38 +0000 | [diff] [blame] | 250 | \seetext{M. Matsumoto and T. Nishimura, ``Mersenne Twister: A |
| 251 | 623-dimensionally equidistributed uniform pseudorandom |
| 252 | number generator'', |
| 253 | \citetitle{ACM Transactions on Modeling and Computer Simulation} |
| 254 | Vol. 8, No. 1, January pp.3-30 1998.} |
| 255 | |
Tim Peters | 902446a | 2001-01-24 23:06:53 +0000 | [diff] [blame] | 256 | \seetext{Wichmann, B. A. \& Hill, I. D., ``Algorithm AS 183: |
| 257 | An efficient and portable pseudo-random number generator'', |
| 258 | \citetitle{Applied Statistics} 31 (1982) 188-190.} |
Guido van Rossum | e47da0a | 1997-07-17 16:34:52 +0000 | [diff] [blame] | 259 | \end{seealso} |