HP Forums

Full Version: Order of operations - what is 6÷2(1+2) ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Physics-astronomy.com

Usually we would work from the inside out in RPN.

I keyed this as written on my PRIME app with the implied multiplication and it gives the answer the website above says is incorrect.

So... ?
The answer is 1
More interestedly is the fact that you can’t put just 1 in this message - it moans that it must be 5 Chars minimum
(12-07-2018 12:03 AM)Leviset Wrote: [ -> ]The answer is 1

The point was, I think: why isn't the answer 9, which the normal rules of operator precedence seem to imply?

The video claims that taking everything after the ➗ as the denominator has been obsolete for 100 years, and that current practice should evaluate the division before the implied multiplication (left to right). But the calculator result would seem at odds with that.

Unfortunately, my video stopped playing half-way though, so I may have missed something vital Smile
My HP20s gives me an answer of 9.
Hp50g in algebraic mode also give 9

Prime gives 1

Jim
This is presumably because the Prime doesn't enter the division symbol as is, but uses it to immediately present a fractional input, thus enforcing the (wrong?): everything else is the denominator.
Some other examples of different calculator interpretations of the rules of operator precedence.

My HP-48GX returns an answer of 9 when I enter '6/2*(1+2)' EVAL or 1 if I use the Equation Writer and use implied multiplication of 6/2(1+2) which is converted to 6/(2*(1+2))'.

My Casio fx-115ES Plus returns an answer of 1 if I enter 6/2(1+2) or 9 if I enter 6/2*(1+2).

WolframAlpha returns 9 to 6/2*(1+2) or 6/2(1+2).

Google returns 9 to 6/2*(1+2) or 6/2(1+2).

My Prime app returns 1 if I enter 6/2*(1+2) or 6/2(1+2). I can't seem to use an implied multiply on the Prime without it being converted to a *.

Another discussion on this topic:
https://www.quora.com/What-will-be-the-v...3%B72-1-+2
CASIO fx-991LA X:

6÷2×(1+2) = —> 9

6÷2(1+2) = —> 1 and afterwards the expression is automatically rewritten as 6÷(2(1+2))
nspire and voyage200 both return 9 and convert to 6/2.(1+2) no matter if it is entered with an explicit multiplication or not. My old eyes have a hard time seeing the dot on the nspire screen.
"egg or chicken came first" "problem" once again.
Hello!

We've discussed this before, but without some "strage unwritten agreement" the answer is 9. This is how they teach mathematics at schools and universities in my part/most parts of the world and how, as is obvoius from the postings above, most smart calculators are programmed too.
Maybe it is time to trash those ambiguos unwritten agreements and start doing things in a standardised way instead of digging them up year after year?

Regards
Max
I think most programming languages do it right.

I tried it in python and perl, and both threw an error.

Mathematical expressions in programming and on calculators should be unambiguous.

JSBach
What this boils down to is whether or not implicit multiplication takes precedence over "normal" multiplication and division. While it was many years ago, I have no recollection of this being taught in maths classes in either of two different countries (the approach to teaching in France is quite different to that in the UK), so I would say that the expression is equivalent to (6÷2)(1+2) = 9.
(12-07-2018 10:22 AM)grsbanks Wrote: [ -> ]What this boils down to is whether or not implicit multiplication takes precedence over "normal" multiplication and division. While it was many years ago, I have no recollection of this being taught in maths classes in either of two different countries (the approach to teaching in France is quite different to that in the UK), so I would say that the expression is equivalent to (6÷2)(1+2) = 9.

For me, it's not the 'implicit multiplication' but the fact that writing ÷ by hand is so uncommon. What's much more common is writing \( \frac{6}{2(1+2)} \) or \( \frac{6}{2} (1+2) \) where the scope of the division is given by the length of the line and unambiguous.

Either way, children are taught BODMAS / PEMDAS [1] and it's just a case of applying the rules, taking care not to assume you know what the question is.

[1] Or the equivalent in other languages
(12-07-2018 10:22 AM)grsbanks Wrote: [ -> ]… I have no recollection of this being taught in maths classes …

We don't have this ambiguity in math.
You either write:

\(\frac{6}{2}(1+2)=9\)

Or then:

\(\frac{6}{2(1+2)}=1\)

Cheers
Thomas
(12-07-2018 10:53 AM)BruceH Wrote: [ -> ]Either way, children are taught BODMAS / PEMDAS [1] and it's just a case of applying the rules, taking care not to assume you know what the question is.

Exactly. Absent the traditional, unambiguous notation, BODMAS/PEMDAS is what has to be applied, hence the answer being \( \frac {6}{2}(1+2) = 9\)
Never trust a calculator Smile
If any calculator has the nerve to say that 6÷2(1+2)=1, but then turn around and say that -2^2=-4, then it can just go straight in the bin.
The result is undefined (both results are correct till somebody clarifies such types of expressions) due to ambiguity and depends purely on implementation of calc manufacturers. The order of operations is written in each user guide, at least I hope.
Engineers from Casio decided to solve this ambiguity by adding another pair of brackett, I agree with this solution.
Personally I prefer the result is "1" since I evaluate the 2(1+2) first.
(12-07-2018 12:03 AM)Leviset Wrote: [ -> ]The answer is 1

That's only the case if the implied multiplication is done before the division. If you're doing it by hand using the PMDAS rules, you would do this:

Parentheses first:
(1+2) = 3

multiplication and division are left to right:

6/2 = 3

3 * 3 = 9

so the answer would be 9. The implied multiplication doesn't take precedence over the division which comes first, reading left to right.
Pages: 1 2
Reference URL's