Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

I was having a heated debate with my colleague and we can't agree on the answer to this question: Does 6÷2(2+1) equal 9 or does it equal 1?

share|improve this question

marked as duplicate by Henry T. Horton, Pedro Tamaroff, Cameron Buie, Brian M. Scott, lhf Sep 18 '12 at 22:25

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
These tags have nothing to do with the question. Furthermore, this has already been addressed on many fora, including this one, many times. The answer is that there is ambiguity in the order of operations with the division sign. Therefore, there is no correct answer as there is no generally accepted order of operations for this notation. –  Arkamis Sep 18 '12 at 21:47
2  
The textbook answer is that operations of equal precedence are performed from left to right in the absence of parentheses, so the result is $9$. The real answer is that the expression equals the writer is incompetent: in the real world it’s ambiguous, and the ambiguity is sufficiently obvious that failure to avoid it is inexcusable sloppiness. –  Brian M. Scott Sep 18 '12 at 21:50
add comment

1 Answer 1

Depends on whether $6 \div 2 \times (2+1)$ means $(6 \div 2) \times (2+1)$ or $6 \div (2 \times (2+1))$. The former yields $9$, the latter $1$. In a programming language like Haskell, the ambiguity would be resolved by specifying what the priority of each operator is, and whether such operator is left- or right-associative.

Remark: Note that in this context, an operator is a binary arithmetic operation. Thus, addition, subtraction, multiplication, and division are operators.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.