Well, no, they're not contradictory, if only for the reason the sentences say "most" :-)
In either case, where the order of operations does not affect the result, the compiler should be free to choose the most efficient method. No matter how you slice and dice it, 7 * 2
is always equal to 2 * 7
.
Consider the statement:
a = (b + 1) * (c + 2)
The compiler can choose whether is uses:
(b + 1) * (c + 2)
(c + 2) * (b + 1)
or even:
(b * c) + b + b + c + 2
provided that the results are the same (within the expected bounds of accuracy).
In fact, provided the results are identical, even a statement like:
newval = 100 * PI * E / val * tot / 0.2
can have its individual components moved around without an issue. If the compiler can achieve the same ends with faster or smaller code, it should.
Language standards tend to specify that a certain result has to be reached, not how that result is reached.