My application generates different floating point values when I compile it in release mode and debug mode. The only reason I found out is to keep the binary trace log, and the one that is so little detuned from the release build from the debug build, it seems that the bottom two bits of the 32-bit float values are different from 1/2 of the case.
Would you consider this “difference” a mistake or expect such a difference. This will be a compiler error or an internal library error.
For example:
LEFTPOS and SPACING are defined floating point values. float def_x; int xpos; def_x = LEFTPOS + (xpos * (SPACING / 2));
The problem is with the X360 compiler.
c ++ c compiler-construction floating-point debugging
KpexEA
source share