>Double already has +Inf and -Inf; it's just that Haskell doesn't have
>(AFAIK) syntax to write them as constants.

        In the source for the GHC libraries it uses 1/0 for +Infinity
and -1/0 for -Infinity, so I assume these are the "official" way to do it.

Personally I would define nicer names:

        positiveInfinity :: Double
        positiveInfinity = 1/0

        negativeInfinity :: Double
        negativeInfinity = -1/0

Keean.
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to