Subject: Re: -ffast-math and packages
To: Frederick Bruckman <fredb@immanent.net>
From: Krister Walfridsson <cato@df.lth.se>
List: tech-pkg
Date: 05/23/2003 23:38:10
On Fri, 23 May 2003, Frederick Bruckman wrote:

> It was my understanding that -ffast-math was "mostly harmless" for any
> normal use of floating point, and that the only reason it wasn't the
> default is that it breaks strict conformance with some standard. I
> wonder what the issue is with -ffast-math regarding postgresql?

I'm not sure what you mean by "normal use of floating point", but
-ffast-math is far from harmless for code that is serious in using
floating point arithmetic.  The main problem is that it will let the
compiler do optimizations that affect the rounding behavior (for example
changing A/(B/C) to (A/B)*C).  This may easily introduce big errors.

One other thing it does is breaking all code that is using NaNs.

   /Krister