Floating point problems
skaller
skaller at users.sourceforge.net
Wed Aug 30 17:05:43 EDT 2006
On Wed, 2006-08-30 at 14:58 -0400, David Roundy wrote:
> It's
> sad, but we're stuck with it, as I'm not aware of any compiler that is
> capable of generating IEEE arithmetic.
Gcc man page:
-ffast-math
Sets -fno-math-errno, -funsafe-math-optimizations, -fno-trap‐
ping-math, -ffinite-math-only, -fno-rounding-math, -fno-signal‐
ing-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 func‐
tions.
Exact portable calculations are the default: you have to
enable non-IEEE/ISO C conformance to get good performance
explicitly with a switch.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
More information about the Glasgow-haskell-users
mailing list