Top "Fast-math" questions

The `-ffast-math` (or a similarly-named) compiler option trading precision and adherence to the IEEE 754 floating point standard in favor of execution speed

Why doesn't GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)?

I am doing some numerical optimization on a scientific application. One thing I noticed is that GCC will optimize the …

gcc assembly floating-point compiler-optimization fast-math
What does gcc's ffast-math actually do?

I understand gcc's --ffast-math flag can greatly increase speed for float ops, and goes outside of IEEE standards, but I …

performance math gcc floating-point fast-math
gcc -Ofast - complete list of limitations

I'm using -Ofast gcc option in my program cause latency requirements. I wrote simple test program: #include <iostream> #…

c++ gcc fast-math
Negative NaN is not a NaN?

While writing some test cases, and some of the tests check for the result of a NaN. I tried using …

c++ nan fast-math