3

Very dumb question:

What is the order of operations in the following:

PEMDAS a/b+c = a : b + c (where ":" is the division symbol)

7/1+6 or 7:1+6

in the example below is it 1 or 13?

Arturo Magidin
  • 398,050
John
  • 31
  • 2
    Standard order convention would have it be $13$. You would need $7/(1+6)$ or $7\colon(1+6)$ for it to be interpreted as $1$. – Arturo Magidin Jun 29 '12 at 15:42
  • 3
    If you are entering things into a computer program, you need to know the order of precedence that it uses. If you are communicating with a human, if in doubt use parentheses. – André Nicolas Jun 29 '12 at 15:47

2 Answers2

2

It is better written as $\dfrac{a}{b}+c$ or $(a/b)+c$ to avoid such possible ambiguity, assuming that is what it means (else, $a/(b+c)$ or $\dfrac{a}{b+c}$). I think we can all agree that, for example, $ab+c$ is shorthand for $(ab)+c$ rather than $a(b+c)$, but division with / (or ÷) can add human parsing problems if parentheses are not used. See also Gerry Myerson's answer to a related question.

Jonas Meyer
  • 53,602
  • Thank you for your reference. As I suspected it is ambiguous. The issue was it's representation: a --- b+c – John Jun 29 '12 at 16:04
0

First use PEMDAS and if two operations of same precedence occurs then Standard order convention is to evaluate from left to right.Here, division precedes over addition and hence answer is 13.

Aang
  • 14,672