[M3devel] random.longint()?
Tony Hosking
hosking at cs.purdue.edu
Sat May 15 18:36:25 CEST 2010
I hesitate to slow down the default implementation of random by using LONGINT (slow) instead of INTEGER (fast).
On 15 May 2010, at 03:03, Jay K wrote:
>
> In libm3 there is random number generation.
> In libm3 that is code that wants 8 random bytes.
> If integer is 4 bytes, it calls random.integer() twice, else if it is 8, once.
>
> It seems natural that we should provide random.longint()?
>
> And then the other code can just use it?
>
> Someone can look into the random number generator and
> - make sure it is actually "correct" for 64bit integer?
> - and if so, change the lowest level to use LONGINT
> and layer integer over it? -- not sure how, presumably
> taking only the lower 32bits loses too much randomness?
>
>
> This is what I get for looking into why we are ever asked to extract 0 bits..
>
> "Everywhere I look, I see bugs." (topic of a separate mail)
>
> - Jay
>
>
More information about the M3devel
mailing list