Re: Floating point performance issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/26/2011 7:59 AM, Vincent Lefevre wrote:
On 2011-12-26 12:37:27 +0100, David Brown wrote:
If it matters that "a + b - c" be calculated "(a + b) - c" or "a + (b - c)",
then use brackets.

but brackets shouldn't change anything with -fassociative-math.

In C, brackets are purely syntactic, i.e. a + b - c is equivalent
to (a + b) - c.
This was so prior to 1989, but the rules changed with the advent of ISO standards. Even where compilers support algebraic simplification across parentheses in violation of the standards, the results are unreliable as well as non-portable.
--
Tim Prince


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux