[erlang-questions] Implementation of a 2006 version of Wichmann-Hull random number generator for Erlang/OTP

Kenji Rikitake <>
Tue Nov 23 13:59:19 CET 2010


Greco: Yes - I remembered your code pieces and bug reports.

I should add that giving zero to any of the seed tuple elements will
render the random number generator useless because the zeros will stay
forever, and that this should be checked at least in the (re)seeding
functions.  (This is a known limitation of the algorithm based on
multiplicative congluency generators.)

Regards,
Kenji Rikitake

In the message <>
dated Tue, Nov 23, 2010 at 01:39:28PM +0100,
Cristian Greco <> writes:
> On Tue, 23 Nov 2010 20:15:42 +0900
> Kenji Rikitake <> wrote:
> 
> > The random module of Erlang/OTP library uses the 1982(!)[1] version of
> > Wichmann-Hull random number generator (RNG), which has been known to
> > have a limitation of short cycle length (~ 7 x (10^12)).
> > [...]
> 
> Hi Kenji,
> 
> the current implementation of the WH prng is Erlang is also slightly
> broken. I sent a patch some weeks ago, it is still cooking in pu:
> 
> http://www.erlang.org/cgi-bin/ezmlm-cgi?3:1556
> http://www.erlang.org/cgi-bin/ezmlm-cgi?3:1557
> 
> Thanks,
> --
> Cristian Greco
> GPG key ID: 0xCF4D32E4


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20101123/ebcd302b/attachment.bin>


More information about the erlang-questions mailing list