|
From: Stefan H. <st...@to...> - 2009-04-27 16:10:17
|
At least nan, inf, etc. do not work (correctly) when __FAST_MATH__ is on. >gcc's man page says: > >"-ffast-math >Sets -fno-math-errno, -funsafe-math-optimizations, -fno-trapping-math, - >ffinite-math-only, -fno-rounding-math, -fno-signaling-nans and fcx- >limited-range. >This option causes the preprocessor macro "__FAST_MATH__" to be defined. > >This option should never be turned on by any -O option since it can >result in incorrect output for programs which depend on an exact >implementation of IEEE or ISO rules/specifications for math functions." > >I agree 'fast' sounds like a recommendation, they probably should have >called it GCC_BROKEN_MATH. :) Stefan http://www.topoi.ch |