- Thread starter
- #21
swearingen
Civil/Environmental
- Feb 15, 2006
- 663
A quick note on calculators:
My HP48 also outputs 25 when I square -5. The reason is that in order to enter the -5 you have effectively put parenthesis around it. The calculator assumes that since you entered it first, you wanted it first. If you typed -5^2 + 5^2 and then hit execute, it should give you 0, which is the correct answer. This means that it would be using the order of operations correctly. Excel incorrectly says this is 50.
Again, by international agreement, as stated in dik's link, for -5^2, the number to be squared is 5, THEN the negative is applied. In Tomfh's first link, Microsoft even admits that Excel does not use the standard order of operations (which is the link I was speaking about in my original post):
Mathematica and MathCAD give the correct output.
My HP48 also outputs 25 when I square -5. The reason is that in order to enter the -5 you have effectively put parenthesis around it. The calculator assumes that since you entered it first, you wanted it first. If you typed -5^2 + 5^2 and then hit execute, it should give you 0, which is the correct answer. This means that it would be using the order of operations correctly. Excel incorrectly says this is 50.
Again, by international agreement, as stated in dik's link, for -5^2, the number to be squared is 5, THEN the negative is applied. In Tomfh's first link, Microsoft even admits that Excel does not use the standard order of operations (which is the link I was speaking about in my original post):
Mathematica and MathCAD give the correct output.