isnan(NAN) results in -1 instead of +1 in C99 mode
Here's an example which gives different results according to the number of threads with which it is run. I am not entirely sure if this is the same bug, as in the code from the link it gives different results even with the same number of threads, but this is at least reproducible. Compile like this: g++ -fopenmp file.cpp And then run multiple times passing different number of threads: ./a 2 ./a 3 ./a 4 When compiled with mingw, gives different results, while with GCC in linux it always gives the...
Arithmetic on long doubles giving weird results when multi-threaded