Re: [Haskell] trouble with the random number generator

2010-04-08 Thread Ian Lynagh
On Thu, Apr 08, 2010 at 10:20:25AM -0400, Garrett Mitchener wrote: > > 1/2 - 2^31/(2^32-1) = 2^31( 1/2^32 - 1/(2^32-1) ) = -1.164e-10 < 0 > > which is outside the required range. Yup, looks like a bug to me. Even if it were fixed so that the maths seemed to show no bug, I wouldn't be surprised

[Haskell] trouble with the random number generator

2010-04-08 Thread Garrett Mitchener
Hi, I'm having some trouble with the standard random number generator. I re-implemented it for speed, but the same problem seems to be present in the original. The problem I'm having is in the generation of a random Double. If you go down to the function randomIvalDouble in Random.hs (and I'm lo

[Haskell] Re: [Haskell-cafe] ANNOUNCE: Hac phi 2010

2010-04-08 Thread Chris Casinghino
Hi Jason, > If you don't run out of space, what is the registration deadline? There's no official deadline to register with us, though we'll probably need the names a few days ahead of time to get wifi keys for everyone. We did get a hotel discount for people coming in from out of town (see the