Hi Fergus,
Thanks for your bug report:
| For hugs-1.4, the following query
|
| hugs> let x::Double; x = (1.0e100 - 1.0e100) in x == x
|
| results in the answer "False" on a sparc-sun-solaris2.5 system.
| It also results in the hugs interpreter crashing due to
| "Unexpected signal"
| on a dec-alpha-osf3.2 system. These should probably both be
| considered bugs.
And on an Intel machine I get yet another different behaviour: True!
You're right that it's a problem, but I don't know how to address it.
I do remember looking into this a few years ago and concluding that
there was no way to handle it nicely with the range of different C
compilers that `mattered to me' at the time. Times, and compilers,
have changed however. If you've found a good way to deal with this
in your Mercury implementation (or if anybody else has a good
solution), then I'd be very interested to hear about it!
| The other bug is that the documentation doesn't say what should
| happen in the case of floating pointer overflow.
I guess we must defer to the Haskell manual for that? Whatever it
says goes, and if it doesn't say anything, then anything goes!
(Or is that: if it says nothing, then nothing goes? :-)
All the best,
Mark