[Haskell-cafe] NaN, Infinity literals
Chris Kuklewicz
haskell at list.mightyreason.com
Thu Sep 7 05:14:14 EDT 2006
You want the RealFloat class functions:
http://haskell.org/ghc/docs/latest/html/libraries/base/Prelude.html#t%3ARealFloat
Tamas K Papp wrote:
> Hi,
>
> Is there a way to use NaN and Infinity as literals, or at least to
> test if a value is NaN or Infinity?
>
> I tried
>
> *Main> let nan=0/0
> *Main> nan
> NaN
> *Main> nan==0/0
> False
>
> so "storing" the value does not work...
>
> Thanks,
>
> Tamas
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
More information about the Haskell-Cafe
mailing list