1

Possible Duplicate:
What is 48÷2(9+3)?

My friend asked me value of expression 16/4*4. So what is value of 16/4*4? Is it 16 or 1. if you solve it right to left it's 1. But if you solve it from left to right its value is 16. So which one is correct. And why?

2 Answers2

10

It's an ambiguous expression, which is best clarified with the use of parentheses to make explicit the first operation to perform, and on which two integers.

That is, the expression is best expressed by presenting it as one of:

$\;(16 / 4)* 4 = 16\;\tag{1}$ OR $\;16/(4* 4)=1\,\;\tag{2}$

leaving no room for confusion or ambiguity on the part of the reader.

That said:

Since division and multiplication are equal in precedence (see order of operations), and absent any parentheses, then by convention, we evaluate from left to right.

That is: we evaluate $\;16/4*4 = 4 * 4 = 16,\;$ just as we would evaluate $(1)$ above.


I'll quote from Gerry Myerson's answer to this post:

"There is no Supreme Court for mathematical notation; there were no commandments handed down on Sinai concerning operational precedence; all there is, is convention, and different people are free to adhere to different conventions. Wise people will stick in enough parentheses to make it impossible for anyone to mistake the meaning."

They use $(1)$ when they mean $(1)$, and use $(2)$ when they mean $(2)$.

amWhy
  • 209,954
5

Order of Operations demands that expressions are evaluated left to right.

Ron Gordon
  • 138,521
  • 2
    Not always. $2^{2^3}$ is usually interpreted as $2^{(2^3)} = 256$, rather than $(2^2)^3=64$. – Rick Decker Jan 02 '13 at 18:26
  • Right. I should have mentioned that OO demands left to right after all other considerations. Thank you for pointing that out. – Ron Gordon Jan 02 '13 at 18:28