[Top][All Lists]
[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: |
Tue, 19 Jul 2011 15:48:46 +0200 |
On Tue, Jul 19, 2011 at 13:22, Holger Hans Peter Freyther
<address@hidden> wrote:
> Hi all,
>
> I have noticed a regression with master in one of my codes, I try to generate
> a random number like:
>
> (Random between: 100000000000 and: 999999999999) asString
>
>
> It is working with 3.2, it fails with a primitiveError in master. Is this
> something easy to fix?
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. :)
Paolo