úÎo8jÒ#      !"portable experimentalbos@serpentine.comNone(An immutable snapshot of the state of a . Convert seed into vector. %A shorter name for PRNG state in the # monad. %A shorter name for PRNG state in the $ monad. -State of the pseudo-random number generator. 7The class of types for which we can generate uniformly  distributed random variates. The uniform PRNG uses Marsaglia'!s MWC256 (also known as MWC8222) A multiply-with-carry generator, which has a period of 2^8222 and @ fares well in tests of randomness. It is also extremely fast, 9 between 2 and 3 times faster than the Mersenne Twister. Note : Marsaglia',s PRNG is not known to be cryptographically @ secure, so you should not use it for cryptographic operations. =Generate a single uniformly distributed random variate. The * range of values produced varies by type: ) For fixed-width integral types, the type's entire range is  used. + For floating point numbers, the range (0,1] is used. Zero is 8 explicitly excluded, to allow variates to be used in 9 statistical calculations that require non-zero values  (e.g. uses of the % function). To generate a &) variate with a range of [0,1), subtract  2**(-33). To do the same with ' variates, subtract  2**(-53). ;Generate single uniformly distributed random variable in a  given range. - For integral types inclusive range is used. & For floating point numbers range (a,b] is used if one ignores  rounding errors. .Constrain the type of an action to run in the $ monad. .Constrain the type of an action to run in the # monad. 4Create a generator for variates using a fixed seed. BCreate a generator for variates using the given seed, of which up < to 256 elements will be used. For arrays of less than 256 ; elements, part of the default seed will be used to finish  initializing the generator' s state.  Examples:   initialize (singleton 42)  . initialize (fromList [4, 8, 15, 16, 23, 42]) =If a seed contains fewer than 256 elements, it is first used ! verbatim, then its elements are (ed against elements of the . default seed until 256 elements are reached. DIf a seed contains exactly 258 elements, then the last two elements  are used to set the generator'!s initial state. This allows for 2 complete generator reproducibility, so that e.g. gen' == gen in  the following example: gen' <-   .  =<<  Convert vector to . It acts similarily to   and A will accept any vector. If you want to pass seed immediately to H restore you better call initialize directly since following law holds: # restore (toSeed v) = initialize v Save the state of a , for later use by .  Create a new # that mirrors the state of a saved . )Acquire seed from devurandom %Seed a PRNG with data from the system's fast source of  pseudo-random numbers ("/dev/urandom" on Unix-like systems),  then run the given action. DThis is a somewhat expensive function, and is intended to be called ? only occasionally (e.g. once per thread). You should use the  - it creates to generate many random numbers. Note4: on Windows, this code does not yet use the native E Cryptographic API as a source of random numbers (it uses the system D clock instead). As a result, the sequences it generates may not be  highly independent. %Seed a PRNG with data from the system's fast source of pseudo-random  numbers. All the caveats of  apply here as well. *<Compute the next index into the state pool. This is simply  addition modulo 256. :Generate a vector of pseudo-random variates. This is not " necessarily faster than invoking  repeatedly in a loop, : but it may be more convenient to use in some situations. 6+,-./01 23 4)*56789:;<=>?@ABCDEFGHIJKL    1+,-./01 23 4)*56789:;<=>?@ABCDEFGHIJKLportable experimentalbos@serpentine.comNone?Generate a normally distributed random variate with given mean  and standard deviation. BGenerate a normally distributed random variate with zero mean and  unit variance. The implementation uses Doornik's modified ziggurat algorithm. B Compared to the ziggurat algorithm usually used, this is slower, C but generates more independent variates that pass stringent tests  of randomness. 6Generate an exponentially distributed random variate. =Generate truncated exponentially distributed random variate. 1Random variate generator for gamma distribution. :Random variate generator for the chi square distribution. 9Random variate generator for the geometric distribution, > computing the number of failures before success. Distribution's  support is [0..]. BRandom variate generator for geometric distribution for number of  trials. Distribution's support is [1..] (i.e. just   shifted by 1). MNMean Standard deviation Scale parameter  Generator Scale parameter Range to which distribution is & truncated. Values may be negative.  Generator. Shape parameter Scale parameter  Generator Number of degrees of freedom  Generator p! success probability lies in (0,1]  Generator p! success probability lies in (0,1]  Generator OP MNOPportable experimentalbos@serpentine.comNone A . that uses boxed vectors, and is able to hold  any type of element. A  that uses unboxed vectors. ?A lookup table for arbitrary discrete distributions. It allows & the generation of random variates in O(1). Note that probability  is quantized in units of 1/2^32, and all distributions with 6 infinite support (e.g. Poisson) should be truncated. 1Generate a random value using a condensed table. ?Generate a condensed lookup table from a list of outcomes with = given probabilities. The vector should be non-empty and the B probabilites should be non-negative and sum to 1. If this is not : the case, this algorithm will construct a table for some A distribution that may bear no resemblance to what you intended. Same as " but treats number as weights not < probilities. Non-positive weights are discarded, and those  remaining are normalized to 1. @Generate a condensed lookup table from integer weights. Weights  should sum to 2^32 . If they don' t, the algorithm will alter the D weights so that they do. This approach should work reasonably well  for rounding errors. !=Create a lookup table for the Poisson distibution. Note that 3 table construction may have significant cost. For » < 100 it ? takes as much time to build table as generation of 1000-30000  variates. "5Create a lookup table for the binomial distribution. QR ST!"Number of tries Probability of success U  !"  !" QR ST!"UV      !"#$%&'()*+,'-.*+/*+0'123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUUVW XYZW[mwc-random-0.13.1.0System.Random.MWCSystem.Random.MWC.Distributions System.Random.MWC.CondensedTableSeedfromSeedGenSTGenIOGenVariateuniformuniformRasGenIOasGenSTcreate initializetoSeedsaverestorewithSystemRandomcreateSystemRandom uniformVectornormalstandard exponential truncatedExpgamma chiSquare geometric0 geometric1CondensedTableVCondensedTableUCondensedTable genFromTabletableFromProbabilitiestableFromWeightstableFromIntWeights tablePoisson tableBinomialbaseGHC.STSTghc-prim GHC.TypesIO GHC.FloatlogFloatDouble Data.BitsxoracquireSeedSystem nextIndexUnsigned wordsTo64Bit wordToBool wordToFloat wordsToDoubleioffcoffacquireSeedTimeaa uniformWord32uniform1uniform2subadd uniformRange defaultSeed$fVariate(,,,) $fVariate(,,) $fVariate(,) $fVariateWord $fVariateInt$fVariateDouble$fVariateFloat $fVariateBool$fVariateWord64$fVariateWord32$fVariateWord16$fVariateWord8$fVariateInt64$fVariateInt32$fVariateInt16 $fVariateInt8TsqrpkgError lookupTabledigitcorrectWeights