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@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe