Enum on Float/Double

Ketil Z Malde ketil@ii.uib.no
25 Oct 2002 11:21:47 +0200


George Russell <ger@tzi.de> writes:

> The situation with Enum on Ratio is pretty bad but at least
> it's not hopeless, since rational numbers are at least exact.  But
> for Float/Double it seems to be a total disaster area.  

My vote would be to scrap it.  Enum sounds like it defines an ordering
of elements, and that's IMHO not what the actual implementation looks
like.  But I suppose it will have to wait.

> My preference would be for succ (+-0) to return the smallest positive
> real, since then you could define succ x to be the unique y with
> x < y and forall z . z < y => not (x < z), where such a y exists, and
> I'm not sure if the Haskell standard knows about signed zeros.

Is this really useful?  Why would you need this number?  Peano
artithmetic on reals? :-)

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants