Thanks to Alistair Reid for pointing me to the right part of the
Haskell Report (don't know why I didn't spot it in the first place).
I still have a couple more questions.
> c) I don't think it says anything specific about floating point arith [...]
What about `=='? Is it guaranteed that if `x == y' is true then
`f x == f y' is true for all `f' (presuming that `f x == f y' is
type-correct and does not evaluate to bottom)?
For that matter, are functions required to always return the same results
for the same arguments?
If that were the case, then it would prevent certain optimizations,
e.g. replacing `(x + 0.1) + 0.2' with `x + 0.3', because such
optimizations can change the results returned. Does Haskell allow
these sort of optimizations?
> I guess it would be legal for all Float operations
> to return bottom or 0 or otherwise act strangely - but people would
> soon stop using that compiler.
Do existing Haskell implementations "act strangely" in the sense
of performing optimizations of the sort mentioned above?
--
Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger [EMAIL PROTECTED] | -- the last words of T. S. Garp.