From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Bangerth To: Gabriel Dos_Reis Cc: gcc@gcc.gnu.org, tim@hollebeek.com Subject: Re: What is acceptable for -ffast-math? (Was: associative law incombine) Date: Wed, 01 Aug 2001 10:08:00 -0000 Message-id: References: <15208.13215.622778.721116@perceval.inria.fr> X-SW-Source: 2001-08/msg00057.html > The transformations in question aren't documented. So, those having > "valid reasons to request them" don't even know what there are > requesting with -fdubious-math. Well, but then we're talking about a/b/c -> a/(b*c) "and the like", as a*c+b*c -> (a+b)*c a*x/a -> x and probably a whole lot of other things that are equally "dubious". > But then, if they would have written that form in the first place. But, as I said, there might be cases where you can't write it in an optimized way in the first place, such as in inline double f() { return a/b; } inline double g() { return c; } x = f()/g(); plus inlining. You can't just rewrite this into a form that does the optimized computation without the help of the compiler. However, I'd bet that for the lower parts of the compiler the resulting stream of commands look just the same as if it were x=a/b/c right away. Regards Wolfgang ------------------------------------------------------------------------- Wolfgang Bangerth email: wolfgang.bangerth@iwr.uni-heidelberg.de www: http://gaia.iwr.uni-heidelberg.de/~wolf