
14 Jan
2014
14 Jan
'14
3:03 a.m.
... and let's not forget about such fun stuff as IEEE's -0, e.g.: 1/(-1 * 0) => -Infinity 1/(0 + (-1 * 0)) => Infinity If we take the standpoint that Haskell's Float and Double types correspond to IEEE 754 floating point numbers, there is almost no mathematical equivalence which holds, and consequently almost all folding or other optimizations will be wrong. One can do all these things behind a flag (trading IEEE compatibility for better code), but this shouldn't be done by default IMHO.