Proposal: New Eq and Ord instances for Double and Float

Malcolm Wallace malcolm.wallace at
Mon Sep 26 11:59:26 CEST 2011

Bryan O'Sullivan writes:

> I am strongly against this proposal, as it is in an area that is particularly poorly understood by most programmers (even experts).

Whilst Johan Tibell writes:

> I prefer to stick with IEEE which is well understood and standardized.

So which is it?  Are these standards well-understood or not?

I would argue that the unexpected and unintuitive behaviour of IEEE floats trip up many programmers.  (But that does not necessarily mean that the proposal is going to help.)

For myself, I would prefer NaNs to compare equal.  But if we are suggesting a departure from IEEE, then maybe an even better solution would be to make NaNs exceptions instead of values?


More information about the Libraries mailing list