[Haskell-cafe] instance Enum Double considered not entirely great?

Paterson, Ross R.Paterson at city.ac.uk
Tue Sep 20 18:47:53 CEST 2011


Daniel Fischer writes:
>> A numeric range [a..a+n] might be expected
>> to have a+n+1 elements, but that doesn't hold either for Float and
>> Double.  I think Enum for floating point values is broken
>
>Yes, it is. Like Eq and Ord.

.. only more so.  And the brokenness has infected Rational: try

[1,3..20]::[Rational]


More information about the Haskell-Cafe mailing list