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

Kenji Rikitake kenji.rikitake@REDACTED
Thu Nov 25 04:21:23 CET 2010


The fix looks much better.  I'll put it in the gist.
(BTW gist is a git archive itself so you can fork by yourself)
Kenji Rikitake

In the message <DBE9AC91-1B7B-4BBC-90CF-3717E1448872@REDACTED>
dated Thu, Nov 25, 2010 at 11:34:48AM +1300,
Richard O'Keefe <ok@REDACTED> writes:
> On 24/11/2010, at 6:11 PM, Kenji Rikitake wrote:
> 
> > The 2006 Wichmann-Hill RNG for Erlang moved to
> > https://gist.github.com/713144
> > under the name of
> > random_wh06.erl
> 
> Didn't we just have a discussion about not allowing zeros?
> Shouldn't seed/4 be
> 
> seed(A1, A2, A3, A4) ->
>     put(random_wh06_seed, 
> 	{abs(A1) rem 2147483578 + 1,
> 	 abs(A2) rem 2147483542 + 1, 
> 	 abs(A3) rem 2147483422 + 1,
> 	 abs(A4) rem 2147483122 + 1}).
> 
> Or did I misunderstand?


More information about the erlang-questions mailing list