[Haskell-cafe] Bug with [Double]
Ben Millwood
haskell at benmachine.co.uk
Wed May 19 09:44:04 EDT 2010
On Wed, May 19, 2010 at 10:57 AM, Serguey Zefirov <sergueyz at gmail.com> wrote:
>
> PS
> Rationals:
> Prelude> [1,1+2/3..10] :: [Rational]
> [1 % 1,5 % 3,7 % 3,3 % 1,11 % 3,13 % 3,5 % 1,17 % 3,19 % 3,7 % 1,23 %
> 3,25 % 3,9 % 1,29 % 3,31 % 3]
>
> Same result.
This sounds like a bug to me. The section of the Haskell Report that
deals with the Enum class mentions Float and Double, not Rational, and
there's really no sensible reason why Rationals would exhibit this
behaviour given that they don't have rounding error.
More information about the Haskell-Cafe
mailing list