Dynaplan Smia is developed for two versions of Microsoft Windows; the 32-bit version and the 64-bit version.
For each platform we produce a release build (for customers) and a debug build (for developers).
The table below shows the result returned by the "less than" comparison operator in C++ when applied to two concrete variables a and b.
How can it be that the 64-bit release version gives a different result than the other versions?
After isolating the problem, I searched the Internet and came across the following: NAN comparison under the 64 bit compiler is incorrect.
The IEEE standard for double precision math states the correct result of applying comparison operators to numbers. Microsoft's implementation gives the wrong results when the fast compiler option is used on 64-bit platforms.
In the above link, Microsoft even states that the wrong result is "By design".PSYou probably wonder which values of a and b are used to produce the results shown in the table above. I tested with a=NaN and b = 1.0.DS