[erlang-questions] Erlang random number generator weak?

Bob Ippolito bob@REDACTED
Wed Nov 12 22:18:28 CET 2008


We use the prng from the crypto module, the built-in random module is weak.

On Wed, Nov 12, 2008 at 9:04 PM, mats cronqvist <masse@REDACTED> wrote:
> "Adam Kelly" <cthulahoops@REDACTED> writes:
>
>
>> So, is it an accepted fact that two processes started at almost the
>> same time will produce highly correlated random sequences?
>
>  not afaik.
>
>  but i think it is (possibly un-)common knowledge that given very
>  similar seeds, two sequences will start out similarly.
>
>  the mess below shows the 10:th element of 10 sequences with similar
>  seeds. the sequences diverges pretty rapidly.
>
>  mats
>
> 1> L10=lists:seq(1,10).
> 2> [(fun()->random:seed(1,2,N), hd(lists:reverse([random:uniform(1000)||_<-L10])) end)() || N <- L10].
>
>  [96,449,802,154,507,859,212,565,917,270]
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list