This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: What is acceptable for -ffast-math? A numerical viewpoint


On Wed, 1 Aug 2001 16:55:02 +0200 (MET DST), you wrote:

>So we agree: there are instable problems where -ffast-math makes no sense
>because they are too sensitive even when using stable algorithms. And then
>there are stable problems where stable methods might profit from
>potentially dubious transformations; for these, a/b/c=a/(b*c) and
>a*c+b*c=(a+b)*c would make sense.

Just out of curiosity: what about

	t1 = a*c;
	t2 = b*c;
	res = t1+t2;

Is it supposed to be folded into

	res = (a+b)*c;

with aggressive -ffast-math? Why?

>  Wolfgang

Thanks!

Dima


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]