How does IEEE 754 define equal, and is the Java equal operation in accordance with it?
02:36 26 Feb 2016

How does IEEE 754 define equal for "regular" double floating point numbers? Is the Java implementation of Double.equal in accordance with IEEE 754?

If I leave out the special values like NaN, -0, etc. are IEEE 754 double floating numbers equal, if and only if they have the same 64bits representing them?

IEEE 754 defines how an approximation of "10.12" is to be represented in 64bits as double. IEEE 754 defines how to calculate "6.0+4.12", by representing both values in 64bits and how to derive 64bits that represent the result. I know that the two 64bit patterns I receive are not the same.

What I do not know, if IEEE 754 defines some special equal-relation for those 64bit patterns that still defines them as equal?

I see a lot of documents on how to resemble mathematical equal with floating point numbers. They all claim that 10.12 != 6.0+4.12 if represented and calculated according to IEEE 754. If I do that in Java with Double objects, Java also claims that the two values are not equal. I would like to know if the equal operation of Java Double is in accordance with IEEE 754.

java equals equality ieee-754