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 if you could get an out-of-range result due to Doubles not being able to represent all values exactly. I'd suggest you make a library submission to fix it, so that people can sanity check the new code: http://www.haskell.org/haskellwiki/Library_submissions Thanks Ian _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell