Why does this simple program compiled with gcc,-mfpmath=387, and an optimization level of -O2 or ...

Subscribers:
4,110
Published on ● Video Link: https://www.youtube.com/watch?v=cQXuNXsBrCA



Duration: 3:47
1 views
0


Why does this simple program compiled with gcc,-mfpmath=387, and an optimization level of -O2 or -O3 produce NaN values?
I hope you found a solution that worked for you :)
The Content (except music & images) is licensed under (https://meta.stackexchange.com/help/licensing)CC BY-SA |
Thanks to all those great people for their contributions!

(stackoverflow.com/users/695132/szabolcs)Szabolcs |
(stackoverflow.com/users/4755075/amonakov)amonakov |
(stackoverflow.com/users/2410359/chux-reinstate-monica)chux - Reinstate Monica |
A special thanks goes out to the (https://stackoverflow.com/questions/74728946/why-does-this-simple-program-compiled-with-gcc-mfpmath-387-and-an-optimization)Stackexchange community |

I wish you all a wonderful day! Stay safe :)

x86 c x87 gcc floating-point







Tags:
x86
x87
gcc
floating-point