compare on Double
ndmitchell at gmail.com
Thu Mar 22 06:52:24 EDT 2007
> > My interpretation of Ian's message was a questioning of the behaviour
> > of compare, not of (<) etc. compare can't return False.
> Right, I'm happy with the three False's, it's the incompatible result of
> compare that I'm objecting to.
My main point was the question of whether compilers are free to
optimise _|_ to a concrete (non-nonsensical) value. If so this
proposal can be treated as a no-op by compilers that do.
I'm still not happy with adding more incompleteness into something
that intuitively feels safe - compare is pretty benign. Having a crash
on division is something that does appeal to me more.
For reference, my Catch tool treats Float/Double compare as never
crashing, and division by zero as always crashing - which I find more
More information about the Libraries