September 2017 Update

This commit is contained in:
Ingy döt Net 2017-09-23 10:01:46 +02:00
parent bba7bfd280
commit ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions

View file

@ -0,0 +1,25 @@
main = do
let inf = 1/0
let minus_inf = -1/0
let minus_zero = -1/inf
let nan = 0/0
putStrLn ("Positive infinity = "++(show inf))
putStrLn ("Negative infinity = "++(show minus_inf))
putStrLn ("Negative zero = "++(show minus_zero))
putStrLn ("Not a number = "++(show nan))
--Some Arithmetic
putStrLn ("inf + 2.0 = "++(show (inf+2.0)))
putStrLn ("inf - 10 = "++(show (inf-10)))
putStrLn ("inf - inf = "++(show (inf-inf)))
putStrLn ("inf * 0 = "++(show (inf * 0)))
putStrLn ("nan + 1.0= "++(show (nan+1.0)))
putStrLn ("nan + nan = "++(show (nan + nan)))
--Some Comparisons
putStrLn ("nan == nan = "++(show (nan == nan)))
putStrLn ("0.0 == - 0.0 = "++(show (0.0 == minus_zero)))
putStrLn ("inf == inf = "++(show (inf == inf)))