Steven Schveighoffer wrote:
<snip>
Are you still working on this? :) I think this proves my point. The compiler does not provide an easy way to compare floats bitwise, so this means convoluted hard-to-write code. When we have two operators that do equality -- and one of those means bitwise compare in all other contexts -- I think this is a no-brainer.

I entirely agree.

I've identified these cases in which float equality disagrees with bitwise equality:
- one is +0, one is -0
- both are NaNs, identically signed
- both are infinity, identically signed

In each case, is just does the same as ==.

Indeed, isIdentical is an ugly workaround for this, apparently created instead of sanitising the definition of is to avoid the minuscule amount of code breakage that the latter would effect.

Stewart.

Reply via email to