[Yhc] Odd Show Double results

Ian Lynagh igloo at earth.li
Wed Mar 21 21:17:27 EDT 2007


Hi all,

This program:

main = do print (1/0 :: Double)
          print ((-1)/0 :: Double)
          print (0/0 :: Double)

prints some surprising values:

1.797693134862316e308
-1.797693134862316e308
2.696539702293474e308

Ideal would be these instead, to match GHC:

Infinity
-Infinity
NaN


Thanks
Ian



More information about the Yhc mailing list