[Haskell] Literal for Infinity
Yitzchak Gale
gale at sefer.org
Thu Sep 29 09:41:19 EDT 2005
I wrote:
> > While checking for floating-point overflow and
> > underflow conditions, I tried to create...
> > Infinity with the literal "1e100000"... Is
> > there a better way to check for Infinity?
Tomasz Zielonka wrote:
> Did you try isNaN and isInfinite?
Oops. Thanks! Thanks also to Lennart Augustsson.
I wrote:
> > ...I tried to create... Infinity with the
> > literal "1e100000"... GHC... goes into a deep
> > trance...
Tomasz Zielonka wrote:
> ...it is equivalent to (fromRational 1e100000),
> and (1e100000 :: Rational) can take a
> substantial amount of space.
I see. That explains it. Thanks!
Regards,
Yitz
More information about the Haskell
mailing list