compare on Double

Neil Mitchell ndmitchell at
Wed Mar 21 13:27:19 EDT 2007


> > Neither of these is very satisfactory, as I would expect [...]

And _|_ is perhaps the least satisfactory value of them all!

Following on from the tradition of ByteString, will it be acceptable
for the compiler to turn _|_ into False, as an optimisation?

I agree very much with Sven here, nothing as simple as comparison or
equality should make a program crash. I wouldn't mind division by zero
raising an error - that is something that you could argue for.

Given that Ord and Num operations on Double/Float don't obey lots of
useful properties, due to rounding, perhaps we should just make it
clear (somewhere) that floating point numbers aren't nice things to
work with, and should be avoided when an Integer will do fine. Maybe
thats already implicit in most programmers heads though, so doesn't
even need stating.



More information about the Libraries mailing list