On Tue, 27 Nov 2007 14:41:59 -0500
Isaac Dupree <[EMAIL PROTECTED]> wrote:

> Henning Thielemann wrote:
> > On Mon, 26 Nov 2007, Jason Dusek wrote:
> > 
> >> Among numeric types, it seems that only integer types are Bounded.
> > 
> > Maybe because IEEE format supports Infinity?
> 
> therefore, maxBound is Infinity and minBound negative infinity?

Using Infinity would go against the meaning of Enum. In the
Double/Float types, succ and pred mean "add/subtract 1.0", as opposed
to the unit of least precision. In fact, succ and pred lose meaning
once the precision of the floats exceeds a certain value.

> until (\x -> x == succ x) succ 1.0 :: Float
1.6777216e7

It would be interesting to have an enumeration for Double/Float that
goes from -Infinity to Infinity, reaching every single number on the
way.

Josh Lee
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to