[Haskell-cafe] NaN, Infinity literals

Tamas K Papp tpapp at Princeton.EDU
Thu Sep 7 05:05:31 EDT 2006


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


More information about the Haskell-Cafe mailing list