[erlang-questions] Implementation of a 2006 version of Wichmann-Hill random number generator for Erlang/OTP
Richard O'Keefe
ok@REDACTED
Wed Nov 24 23:35:12 CET 2010
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