[Haskell-cafe] GHC optimisations

Henning Thielemann lemming at henning-thielemann.de
Thu Aug 23 08:32:51 EDT 2007


On Thu, 23 Aug 2007, Neil Mitchell wrote:

> 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.

That's really bad. This will invalidate the clever algorithms for 
computing (+) and (*) with doubled precision (EFT - error free 
transformations).
  http://66.102.9.104/search?q=cache:8vni-CqtINkJ:www.ti3.tu-harburg.de/paper/rump/Ru05c.pdf+TwoSum&hl=de&ct=clnk&cd=1&gl=de


More information about the Haskell-Cafe mailing list