[Haskell] Literal for Infinity
tomasz.zielonka at gmail.com
Thu Sep 29 08:08:35 EDT 2005
On 9/29/05, Yitzchak Gale <gale at sefer.org> wrote:
> While checking for floating-point overflow and
> underflow conditions, I tried to create a somewhat
> reliable cross-platform Infinity with the literal
> When GHC 6.4.1 reads this literal, it goes into a
> deep trance and consumes huge amounts of
> memory. Shouldn't it immediately recognize such a
> thing as Infinity?
I think it is equivalent to (fromRational 1e100000), and (1e100000 ::
can take a substantial amount of space.
Is there a better way to check for Infinity? I
> have not yet figured out how to check for NaN at
> all - because it is not equal to itself. Any
Did you try isNaN and isInfinite? I don't have much experience with these
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell