dbeurle / neon

A finite element code
Other
10 stars 8 forks source link

Fast math optimisations break tests #126

Closed dbeurle closed 5 years ago

dbeurle commented 5 years ago

https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html gives us:

-ffast-math

    Sets the options -fno-math-errno, -funsafe-math-optimizations, -ffinite-math-only, -fno-rounding-math, -fno-signaling-nans, -fcx-limited-range and -fexcess-precision=fast.

    This option causes the preprocessor macro __FAST_MATH__ to be defined.

    This option is not turned on by any -O option besides -Ofast since it can result in incorrect output for programs that depend on an exact implementation of IEEE or ISO rules/specifications for math functions. It may, however, yield faster code for programs that do not require the guarantees of these specifications.