HP Forums
Order of operations - what is 6÷2(1+2) ? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: General Forum (/forum-4.html)
+--- Thread: Order of operations - what is 6÷2(1+2) ? (/thread-11916.html)

Pages: 1 2 3 4 5


RE: Order of operations - what is 6÷2(1+2) ? - Kostas Kritsilas - 12-13-2020 07:40 AM

(12-12-2020 07:59 PM)rprosperi Wrote:  
(12-12-2020 02:11 PM)Massimo Gnerucci Wrote:  Bob, have a look at the video I linked above.

Wow, really good video, thanks for the link Massimo!

Seems one conclusion is Algebraic calculators are inconsistent and potentially confusing if you just type in an equation as given.

I'll consider sticking with RPN/RPL machines, which require some thought to use. So I can decide on PEMDAS or even PEJMDAS, based on which math teachers I'm trying to appease, but at least I can expect consistent results.

Does anyone here recall being taught PEJMDAS, even if that acronym wasn't used?

it wasn't called PEJMDAS, but that is the method I was taught mathematics. I am in Canada, though, so I was never exposed to the teachers that taught PEMDAS. My math teachers described it as simplify all the terms to the extent possible, then apply the rules of precedence. So, everything inside the brackets first, then any terms that apply to the bracketed terms, then the rest from right to left foolwing the rules of precedence. I went to school from the late 1960s onward though, so the teachers I learned basic math from all taught what is now called the PEJMDAS method.

I find it interesting in the video, that the higher level sources for precedence that are quoted are all calling for PEJMDAS. The only people who are putting PEMDAS forward are US school teachers. Seems to me, they need to go back to school themselves. This may be the source of the confusion, as to anybody outside the US, the answer is obvious, as it is to the higher level sources cited in the video.


RE: Order of operations - what is 6÷2(1+2) ? - toml_12953 - 12-13-2020 09:01 AM

(12-12-2020 01:55 PM)ijabbott Wrote:  
(12-12-2020 04:58 AM)toml_12953 Wrote:  Yes, to most programmers I know it means (x/2)*y.

Programmers, perhaps, but what about programming languages? Most would treat x/2y as a syntax error, and x/y2 as division of two variables x and y2 (except those primitive languages that only allow single letter variable names).

Syntax error is exactly why programmers put the missing multiplication sign in there.

x/2y becomes x/2*y

If the author wanted x/(2*y) (s)he should have used parentheses or a textbook notation

Code:
   x
________
  2y



RE: Order of operations - what is 6÷2(1+2) ? - grsbanks - 12-13-2020 12:39 PM

I think x/2y is ambiguous.

NOT ambiguous is \(\frac x{2y}\) because the full denominator, \(2y\), is clearly separated from the numerator by the division bar.

This forum allows the use of mathjax. Use it to make expressions unambiguous. If you just use ASCII then use parentheses to remove any ambiguity.


RE: Order of operations - what is 6÷2(1+2) ? - Hlib - 12-13-2020 04:06 PM

`rprosperi` Wrote:
`Hlib` Wrote:The calculator manual always specifies the priority of operations, so we can use private rules to get rid of ambiguous interpretation.
Implied multiplication and division has a higher priority than normal multiplication and division. Operations with the same priority are performed sequentially from left to right. And that`s where all the arguments end.
6◢2(1+2)=(6÷2)×(1+2)=9 (CASIO)
6÷2(1+2)=6÷(2×(1+2))=1 (CASIO, TI-85,86)
6÷2×(1+2)=(6÷2)×(1+2)=9 (CASIO, TI-83,85,86,89, HP-50G)

I`ve seen people claim this priority, but have never seen this is in any mathematics book, nor ever found a mathematician or teacher that agrees. Do you recall where you learned this or have any reference?

In one of the short guides to TI-85,86 we can read the following rules:
Quote:Priority of operations
The meaning of a formula involving functions, powers, sums, dierences, products, and quotients depends on how the formula is interpreted to determine the order in which the operations are performed. Texas Instruments TI-86 calculators in most instances interpret formulas with the following rules, which are those generally used in manual calculations.
Rule 1 Operations are performed from left to right, except as described in Rules 2 through 5 below.
Rule 2 Expressions inside parentheses are evaluated as soon as they are reached.
Rule 3 Addition and subtraction have the lowest priority. If an addition or subtraction is followed by multiplication, division, a power, or a function, the addition or subtraction is postponed until another addition or subtraction or the end of the expression is reached.
Rule 4 Multiplication and division have medium priority. If a multiplication or division is followed by a power or a function, the multiplication or division is postponed until the power or function has been evaluated.
Rule 5 The taking of powers and evaluation of functions have the highest priority and are performed as soon as they are reached.
Rule 6 The taking of powers has priority over the evaluation of functions that appear before their variables, such as the trigonometric functions, logarithms, ex, p , and negation. Also, the parentheses in expressions such as sin(2) and e ^ (2) are ignored.
The TI-85 also uses the following two additional modications of Rules 1 through 5
Rule 7 Multiplication by juxtaposition has priority over division and multiplication represented by *.
Rule 8 Multiplication represented by juxtaposition, where the second term is a number or a variable, has priority over the evaluation of functions that appear before their arguments:
√4a=√(4*a) ; sin(5)(10)=sin(5*10)
The instructions for the calculator do not claim to be absolute truth, but we have to take into account the rules in the instructions. The calculator can`t read our thoughts and guess what we mean.


RE: Order of operations - what is 6÷2(1+2) ? - Steve Simpkin - 12-13-2020 05:58 PM

I find it interesting that TI changed their approach to the priority of implied multiplication over time. (A reference from the above video.)

"Does implied multiplication and explicit multiplication have the same precedence on TI graphing calculators?

Implied multiplication has a higher priority than explicit multiplication to allow users to enter expressions, in the same manner as they would be written. For example, the TI-80, TI-81, TI-82, and TI-85 evaluate 1/2X as 1/(2*X), while other products may evaluate the same expression as 1/2*X from left to right. Without this feature, it would be necessary to group 2X in parentheses, something that is typically not done when writing the expression on paper.

This order of precedence was changed for the TI-83 family, TI-84 Plus family, TI-89 family, TI-92 Plus, Voyage™ 200 and the TI-Nspire™ Handheld in TI-84 Plus Mode. Implied and explicit multiplication is given the same priority.

Please see the graphing calculator guidebooks for additional information."

https://epsstore.ti.com/OA_HTML/csksxvm.jsp?nSetId=103110


RE: Order of operations - what is 6÷2(1+2) ? - Massimo Gnerucci - 12-13-2020 07:09 PM

(12-13-2020 05:58 PM)Steve Simpkin Wrote:  This order of precedence was changed for the TI-83 family, TI-84 Plus family, TI-89 family, TI-92 Plus, Voyage™ 200 and the TI-Nspire™ Handheld in TI-84 Plus Mode. Implied and explicit multiplication is given the same priority.

Probably because North American teachers just love PEMDAS...
Q.E.D.


RE: Order of operations - what is 6÷2(1+2) ? - toml_12953 - 12-13-2020 08:50 PM

(12-13-2020 07:09 PM)Massimo Gnerucci Wrote:  Probably because North American teachers just love PEMDAS...
Q.E.D.

That's all they were taught in Education classes so why shouldn't they love it?
I just asked a dozen of my friends (mix of math teachers, computer programmers and mere mortals) and none of them ever heard of the J. Some think it's a good idea, though.

As for me, I say just pick one and be consistent, unlike some of the calculator manufacturers.


RE: Order of operations - what is 6÷2(1+2) ? - Steve Simpkin - 12-13-2020 09:04 PM

Looking at all of the comments on these videos and blog posts are quite entertaining. Watching teachers, professors and scientists call each other names is amusing. They usually evolve into something like, "Well, professor Johnson. The only conclusion I can reach is that you are a doodoohead." Seems like a punch line on a Far Side comic. Very funny.


RE: Order of operations - what is 6÷2(1+2) ? - CMarangon - 12-15-2020 12:21 AM

Hello!

1- solve ( )
2 - solve the []
3 - solve { }

6÷2x(1+2)
6÷2x(3)
6÷2x(3)

9




In a set of values
2+3*4 -4 -5 +9
1st - multiplication and division
2nd - sum and subtraction

Try this,

http://www.risolviespressioni.it


RE: Order of operations - what is 6÷2(1+2) ? - toml_12953 - 12-15-2020 12:38 AM

(12-15-2020 12:21 AM)CMarangon Wrote:  Hello!

1- solve ( )
2 - solve the []
3 - solve { }

6÷2x(1+2)
6÷2x(3)
6÷2x(3)

9

In a set of values
2+3*4 -4 -5 +9
1st - multiplication and division
2nd - sum and subtraction

Try this,

http://www.risolviespressioni.it

The above site gets 6 for the answer! They treat implied multiplication like addition!


RE: Order of operations - what is 6÷2(1+2) ? - Gerson W. Barbosa - 12-15-2020 12:53 AM

(12-15-2020 12:21 AM)CMarangon Wrote:  Try this,

http://www.risolviespressioni.it

Peccato ma non funziona, almeno su Safari:

Too bad, that doesn’t work, at least on Safari:

Risolvi Espressioni

6÷2(1+2)

Risoluzione

6:2+(1+2)=

=3+3=

=6

—-

Tom was faster!


RE: Order of operations - what is 6÷2(1+2) ? - cdmackay - 12-16-2020 02:32 AM

slight aside: some UK schools currently teach it as "BODMAS". Opinions differ on what the O stands for. B==P, of course.

Of course, there's no mention of implied multiplication Smile

And UK schools all use Casio, so that must be right!


RE: Order of operations - what is 6÷2(1+2) ? - jthole - 12-16-2020 08:58 AM

When I was in school, we were taught this (but it is universally recognised as outdated now):

"Meneer Van Dale Wacht Op Antwoord".

Machtsverheffen (power)
Vermenigvuldigen (multiply)
Delen (divide)
Worteltrekken (taking the root)
Optellen (add)
Aftrekken (subtract)

Brackets were not seen as an operation, with that ordering scheme, but were understood to be evaluated first.

Dutch students were taught this until at least into the 1990's, I think? (definitely in the early seventies).


RE: Order of operations - what is 6÷2(1+2) ? - mfleming - 12-16-2020 03:59 PM

Just for fun

Code:

TryAPL Version 3.3.0 (Dyalog version 18.0)
Wed Dec 16 2020 07:55:33
Copyright (c) Dyalog Limited 1982-2020
      6÷2(1+2)
3 2



RE: Order of operations - what is 6÷2(1+2) ? - robve - 12-20-2020 02:47 AM

IMHO, both 1 and 9 are correct because the formulation is ambiguous to begin with.

The only calculator that I know that disambiguates this sort of input is my Casio fx-CG50, among my collection. This exact problem is described in the User Guide version 3.40 in section 2-6 on page 52 fx-CG50 user guide

The expression

6÷2(1+2)

is changed to a form with parenthesis showing the explicit evaluation order of the implied multiplication:

6÷(2(1+2))

I like this feature of the Casio.

Apparently, no one reads calculator manuals any more ?

- Rob


RE: Order of operations - what is 6÷2(1+2) ? - klesl - 12-20-2020 08:46 AM

According to me the implicit multiplication (multiplication with omitted multiplication sign) haas higher priority than explicit multiplication becasue I am treating such expression as variables as it shown in many physics and chemistry books or in post 29 written by Massimo


If I see something like this "6÷2(1+2)", then I see "a/bc" which is shortened "a/(b*c)"
Fortunately there is no system like pemdas, bodas or something similar in Czechia.
At least the higher priority for implicit multilipcation works well with no exceptions (I know it is empirical evidence and not the mathematical one)


RE: Order of operations - what is 6÷2(1+2) ? - franz.b - 12-20-2020 08:58 AM

mathematics is a universal language that everyone can understand everywhere. if an expression causes a tread of 57 posts: it is wrong.


RE: Order of operations - what is 6÷2(1+2) ? - Mike T. - 12-20-2020 09:20 PM

I've been following the discussion here with some interest, so I probably ought to declare that I'm firmly in the '1' camp but this is probably only because I group the 2 with the associated brackets,

so I 'see' the expression as;

6
---------
2(2+1)

rather than as;

6
-- (2+1)
2

which may (or may not) be what the author intended.

Before anyone says the answer is obvious, I'd suggest this is only true if you know what convention the author was using when they wrote the expression as a single line.

If this information is missing then it would seem that only thing that is obvious is that expression itself is ambiguous.

Possibly deliberately so. :-)


RE: Order of operations - what is 6÷2(1+2) ? - Valentin Albillo - 12-20-2020 11:24 PM

Hi, Gene:

Gene Wrote:Order of operations - what is 6÷2(1+2) ?


The SHARP PC-1211, which is the very first pocket computer (released back in 1980, i.e.: 40 years ago as of 2020), declared these evaluation priorities:


[Image: SHARP%20PC-1211%20Priority%20of%20calculations.jpg]


which clearly stablishes that implied multiplication (i.e., the "2(1+2)" part) is a high-priority operation, four levels higher than division, so when evaluating the expression it gives 1 as the result, which is fine by me.

            6÷2(1+2)   =   6÷2(3)   =   6÷6   =   1

Best regards.
V.


RE: Order of operations - what is 6÷2(1+2) ? - EugeneNine - 12-21-2020 08:39 PM

I was always taught that you do the () first (without mention of implied * or not)

So 6÷2(1+2) should simplify to
6÷2(3)
6÷6
1

or distribute:
6÷(2+4)
6÷6
1

notice if you tried without doing the () first the distributive property wouldn't work properly
6÷2*3
3*3
9
or
6÷2+4
3+4
7

So you have to do the () first for the distributive property to work.