
23 Aug
2007
23 Aug
'07
8:17 a.m.
Hi
Its (==) isn't reflexive (is it transitive? probably, at least if there aren't too many optimizations, but floating-point transitive equality isn't very useful).
It's not even referentially transparent in all cases. a == b may fail while the double's are in the high precision registers, and then succeed later on in the program once they are truncated. I think you have to specify -fexcess-precision with GHC to get this behaviour. Thanks Neil