Updated by
Modified
test_fpexcept.c- Ignore whitespace
+* 2) Now tell the compiler no exceptions will occur, to enable further optimizations. Compile with:
+ // -fno-trapping-math basically tells the compiler (among other things) we will NOT call the following line:
+ feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW); // turn this on to track NaNs or other floating-point exceptions (requires gcc, #define _GNU_SOURCE and #include <fenv.h>)
You can clone a snippet to your computer for local editing. Learn more.