« Return to Thread: 1.0 / 0.0 is not infinite

Re: 1.0 / 0.0 is not infinite

by Neil Mitchell :: Rate this Message:

Reply to Author | View in Thread

Hi Henk,

>    Hugs> isInfinite $ 1.0 / 0.0
>    False

If you look at the library code it isn't entirely surprising:

instance RealFloat Float where
    isNaN       _ = False
    isInfinite  _ = False
    isDenormalized _ = False
    isNegativeZero _ = False
    isIEEE      _ = False

I guess the fix is to use your version in the isInfinite part. Some of
the others might want fleshing out too. I'm not sure if this is a
Windows only issue, or just a general Hugs thing.

Thanks

Neil
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs@...
http://www.haskell.org/mailman/listinfo/hugs-bugs

 « Return to Thread: 1.0 / 0.0 is not infinite

LightInTheBox - Buy quality products at wholesale price!