help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Limits of Random changed due the mersenne twister


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] Limits of Random changed due the mersenne twister
Date: Fri, 22 Jul 2011 23:59:33 +0200

On Tue, Jul 19, 2011 at 18:05, Holger Hans Peter Freyther
<address@hidden> wrote:
> On 07/19/2011 03:48 PM, Paolo Bonzini wrote:
>
>> Yes, it should be enough to add a handler for the failure of
>> #nextLimit:, and combine a few random integers together before scaling
>> the result down to the limit value.
>>
>> Probably the numbers you were getting were not random at all, so it's
>> good that it now fails. :)
>
> One more Mersenne Twister question. So if someone knows a row of 624 random
> numbers, he knows the internal state of the twister... does it make sense to
> reseed more often?

The Mersenne Twister is _absolutely_ not a cryptographic RNG.  It only
tries hard to produce numbers that look random, it does not prevent
you from reproducing or predicting the sequence.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]