Arithmetic anomaly?...

 

All,

Not sure about this one. I learned in school that it doestn' matter what order additions and subtractions are done, the result is always the same. But look at the screenshot. Notice that the result for mrequest.sl is different to sl9. The only difference between the expresseions is the mrequest.sl has brackets inserted around the MathMax expression. This generates the correct result. sl9 is incorrect. Am I missing something obvious??? Thanks, Ian

Math anomaly

 

mogplus8:

The only difference between the expresseions is the mrequest.sl has brackets inserted around the MathMax expression. This generates the correct result. sl9 is incorrect. Am I missing something obvious???


1. Expressions in brackets have more priority than without.

2. Operations of adding and subrtracting have the same priority and processed from left to right

compare please:

2 - 1 + 1 = 2

2 - (1 + 1) = 0 surprise!

 

Maybe I need to go back to primary maths class.   :-( 

Thanks for the clarification.