Bounded and floating types

Conal Elliott conal at conal.net
Sun Dec 2 13:18:57 EST 2007


Oops -- I'd incorrectly assumed that Haskell guarantees Float & Double to
have infinities.  Thanks,  - Conal

On Dec 2, 2007 9:50 AM, Lennart Augustsson <lennart at augustsson.net> wrote:

> But that only makes sense for floating point types that have -Infinity and
> +Infinity.
>
> On Dec 2, 2007 5:39 PM, Conal Elliott <conal at conal.net> wrote:
>
> > Currently Float & Double do not have standard Bounded instances.  Is
> > there any reason not to use the following?
> >
> > instance Bounded Float  where { minBound = -1/0; maxBound = 1/0 }
> > instance Bounded Double where { minBound = -1/0; maxBound = 1/0 }
> >
> > If I don't hear objections, I'll submit a ticket and re-send a proposal
> > note.
> >
> > - Conal
> >
> >
> > _______________________________________________
> > Libraries mailing list
> > Libraries at haskell.org
> > http://www.haskell.org/mailman/listinfo/libraries
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/libraries/attachments/20071202/c9a3334d/attachment.htm


More information about the Libraries mailing list