[erlang-questions] Erlang random number generator weak?
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 <> wrote:
> "Adam Kelly" <> 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.
> 1> L10=lists:seq(1,10).
> 2> [(fun()->random:seed(1,2,N), hd(lists:reverse([random:uniform(1000)||_<-L10])) end)() || N <- L10].
> erlang-questions mailing list
More information about the erlang-questions