George Russell wrote:
> 
> Lennart Augustsson wrote:
> > By definition, if you follow the standard you can't be wrong. :)
> > But the standard can be wrong.  Perhaps this is a typo in the report?
> I think I looked at this a while back.  The standard is kaput.  It gets even
> worse if you try to make sense of the definitions of succ and pred as applied
> to floating-point number.  My suggestion: get rid of Enum on floating-point
> numbers.  Maybe it'll make floating point loops a little lengthier to code,
> but at least it will be clear what exactly is being coded.

Clear?

I remind you that there is still an uncorrected bug in the domain of
rationals (at least in Hugs, but I believe that also elsewhere, since
this is a plain Haskell bug in the Prelude).

succ (3%2)

gives 2%1.

[3%2 .. something]

gives [1%1, 2%1, ... etc.]

Well, if you see this definition: fromEnum = truncate
for Rationals, then this is hardly a surprise.

[Unless I have an obsolete version of everything, which is possible.
I apologize then, but the following paragraph remains.]

My permanent, constant suggestion: revise all the numeric classes
very thoroughly. Beginning at the beginning.

Jerzy Karczmarczuk
Caen, France

Reply via email to