GeomAlg-0.2.3: Library of geometric algorithms in HaskellSource codeContentsIndex
GeomAlg.External.Random
Description

This module implements a (good) random number generator.

The June 1988 (v31 #6) issue of the Communications of the ACM has an article by Pierre L'Ecuyer called, Efficient and Portable Combined Random Number Generators. Here is the Portable Combined Generator of L'Ecuyer for 32-bit computers. It has a period of roughly 2.30584e18.

Transliterator: Lennart Augustsson

Synopsis
randomInts :: Int -> Int -> [Int]
randomDoubles :: Int -> Int -> [Double]
normalRandomDoubles :: Int -> Int -> [Double]
Documentation
randomInts :: Int -> Int -> [Int]Source
Use seeds s1 in 1..2147483562 and s2 in 1..2147483398 to generate an infinite list of random Ints.
randomDoubles :: Int -> Int -> [Double]Source
Same values for s1 and s2 as above, generates an infinite list of Doubles uniformly distibuted in (0,1).
normalRandomDoubles :: Int -> Int -> [Double]Source
The normal distribution stuff is stolen from Tim Lambert's M*****a version normalRandomDoubles is given two seeds and returns an infinite list of random normal variates with mean 0 and variance 1. (Box Muller method see Art of Computer Programming Vol 2)
Produced by Haddock version 2.4.2