3 ms·
How did you decide that "the method works for LONG_MIN"? Did the method return the expected output of false? Because it really seems like the code is working co
by CGamesPlay 7y ago
How did you decide that "the method works for LONG_MIN"? Did the method return the expected output of false? Because it really seems like the code is working correctly on `-O0` and incorrectly on `-O3`...
- eMSF 7y agoWhy would you expect the output to be false? On any typical system around (with 8-byte longs), LONG_MIN has the value of -2^63 which (converted to a IEEE double-precision float) passes the function's checks just fine -- even if the values around it don't.
- CGamesPlay 7y agoAh, my mistake. Still, seems like the -O0 is actually what's correct and the -O3 is reporting an incorrect answer.