Re: Compiler optimization and floating point operations

christian.bau@cbau.wanadoo.co.uk
Mon, 28 Oct 2013 15:50:07 -0700 (PDT)

          From comp.compilers

Related articles
[2 earlier articles]
Re: Compiler optimization and floating point operations gah@ugcs.caltech.edu (glen herrmannsfeldt) (2013-10-24)
Re: Compiler optimization and floating point operations gneuner2@comcast.net (George Neuner) (2013-10-24)
Re: Compiler optimization and floating point operations jm@bourguet.org (Jean-Marc Bourguet) (2013-10-24)
Re: Compiler optimization and floating point operations sgk@troutmask.apl.washington.edu (Steven G. Kargl) (2013-10-24)
Re: Compiler optimization and floating point operations gneuner2@comcast.net (George Neuner) (2013-10-24)
Re: Compiler optimization and floating point operations gah@ugcs.caltech.edu (glen herrmannsfeldt) (2013-10-24)
Re: Compiler optimization and floating point operations christian.bau@cbau.wanadoo.co.uk (2013-10-28)
Re: Compiler optimization and floating point operations christian.bau@cbau.wanadoo.co.uk (2013-10-28)
Re: Compiler optimization and floating point operations cameron.mcinally@nyu.edu (Cameron McInally) (2013-10-28)
| List of all articles for this month |
From: christian.bau@cbau.wanadoo.co.uk
Newsgroups: comp.compilers
Date: Mon, 28 Oct 2013 15:50:07 -0700 (PDT)
Organization: Compilers Central
References: 13-10-026 13-10-029
Keywords: arithmetic, optimize
Posted-Date: 28 Oct 2013 18:51:53 EDT

> [I think you mean they're not associative. I don't know any situations
> where a+b != b+a, but lots where a+(b+c) != (a+b)+c -John]


Take fused multiply-add, and the expression a*b + c*d.
It can be evaluated either as fma (a, b, c*d) or fma (c, d, a*b).


It would seem natural that the code for a*b + c*d and for c*d + a*b
would be different, with different results.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.