Closed

Description
On Windows, the x87 control word has a different default value than on other platforms. This not only introduces floating point precision issues, but also results in inconsistent behavior with other platforms. I tried to avoid using x87 by adding the -msse2
option when compiling for Windows 32bit, but the compiler still generates binaries using only x87.
The code below outputs differently on Windows 32bit than on other platforms:
#include <stdio.h>
#include <stdint.h>
int main() {
int64_t n = 0b0000000000111111111111111111111111011111111111111111111111111111;
printf("%lld, %.0f, %.0f", n, (float)n, (float)(uint64_t)n);
return 0;
}