fun fact: value of truncate -Infinity depends on optimisation level

26 Jul
2015
26 Jul
'15
12:45 p.m.
Just for general amusement - I was debugging very strange behaviour in a straightforward deterministic program, where the output value seemed to depend on ghc's optimization level. Well, it turned out that I (accidentally) computed truncate (logBase 2 0) :: Int, and that's 0 with -O0, but -9223372036854775808 with -O2. https://github.com/jwaldmann/matchbox/issues/19
3634
Age (days ago)
3634
Last active (days ago)
0 comments
1 participants
participants (1)
-
Johannes Waldmann