Omnimaga
Calculator Community => Other Calculators => Topic started by: supergems on February 03, 2016, 08:49:31 am
-
sometimes the pictures explain better than words ;)
(http://i.imgur.com/tp6JI.jpg)
(http://hansklav.home.xs4all.nl/rpn/Precedence62xplus.jpg)
reference:
https://en.wikipedia.org/wiki/Reverse_Polish_notation
https://en.wikipedia.org/wiki/RPL_(programming_language)
http://hansklav.home.xs4all.nl/rpn/
-
Wow, that's really weird.
-
So TI-OS doesn't follow order of operations the way we'd expect it to. :(
-
Why? Deviding and multiplying have same level of importance and TIOS goes from left to right rather than right to left.
-
You can use the acronym PEMDAS (Parentheses Exponents Multiplication Division Addition Subtraction) to remember order of operations: https://en.wikipedia.org/wiki/Order_of_operations (https://en.wikipedia.org/wiki/Order_of_operations).
For this reason I prefer RPN calculators. ;)
-
I learned that multiplication+devision are same level, same with addition+subtraction. And if those are combind you just go from left to right, so the TI is actually correct IMO
-
##6/2(1+2) =\ 6/2(3) =\ 6/6 =\ 1##
##\frac{6}{2(1+2)} =\ \frac{6}{2(3)} =\ \frac{6}{6} =\ 1##
This is due to how their division works. It's a fraction, not the ÷ symbol. So its 6 over 2(1+2) not six divided by 2(1+2). The way that TI-OS does it there is wrong according to that.
##6÷2(1+2) =\ 6÷2(3) =\ 3(3) =\ 9##
If we aren't treating it as a fraction then it is correc according to standard order of operations.
-
The problem is the interpretation of the arithmetic expression, for PEMDAS the correct order is 6/2(1+2) = 6/2*3 = 6/6 = 1.
-
The problem is the interpretation of the arithmetic expression, for PEMDAS the correct order is 6/2(1+2) = 6/2*3 = 6/6 = 1.
As Sorunome said above, multiplication and division are on the same level and are evaluated left to right, same with addition and subtraction: https://www.mathsisfun.com/operation-order-pemdas.html
-
No, the interpretation is ambiguous for calculators!
https://en.wikipedia.org/wiki/Order_of_operations
Exceptions[edit]
There exist differing conventions concerning the unary operator − (usually read "minus"). In written or printed mathematics, the expression −3^2 is interpreted to mean 0 − (3^2) = −9,[1][5] but in some applications and programming languages, notably Microsoft Office Excel (and other spreadsheet applications) and the programming language bc, unary operators have a higher priority than binary operators, that is, the unary minus (negation or +/-) has higher precedence than exponentiation, so in those languages −32 will be interpreted as (−3)^2 = 9.[6] This does not apply to the binary minus operator −; for example while the formulas =-2^2 and =0+-2^2 return 4 in Microsoft Excel, the formula =0-2^2 returns −4. In cases where there is the possibility that the notation might be misinterpreted, a binary minus operation can be enforced by explicitly specifying a leading 0 (as in 0-2^2 instead of just -2^2), or parentheses can be used to clarify the intended meaning.
Similarly, there can be ambiguity in the use of the slash ('/') symbol in expressions such as 1/2x.[7] If one rewrites this expression as 1 ÷ 2 × x and then interprets the division symbol as indicating multiplication by the reciprocal, this becomes:
1 : 2 * x = 1 * (1/2) * x = (1/2)*x.
With this interpretation 1/2x is equal to (1/2)x.[1][8] However, in some of the academic literature, implied multiplication is interpreted as having higher precedence than division, so that 1/2x equals 1/(2x), not (1/2)x. For example, the manuscript submission instructions for the Physical Review journals state that multiplication is of higher precedence than division with a slash,[9] and this is also the convention observed in prominent physics textbooks such as the Course of Theoretical Physics by Landau and Lifshitz and the Feynman Lectures on Physics.[nb 1] Wolfram Alpha changed in early 2013 to treat implied multiplication the same as explicit multiplication. Formerly, implied multiplication without parentheses was assumed to bind more strongly than explicit multiplication. 2x/2x, 2·x/2·x, and 2(x)/2(x) now all yield x2.[10] Newer Texas Instruments calculators (TI-83 or later) also yield x2 in all three cases.[11]
[10] http://www.wolframalpha.com/input/?i=2x%2F2x,+2*x%2F2*x,+2(x)%2F2(x)+ (http://www.wolframalpha.com/input/?i=2x%2F2x,+2*x%2F2*x,+2(x)%2F2(x)+)
[11] https://epsstore.ti.com/OA_HTML/csksxvm.jsp?nSetId=103110 (https://epsstore.ti.com/OA_HTML/csksxvm.jsp?nSetId=103110)
-
I was confused at first trying to figure out where 9 came from; I thought that they were treating 2(3) as some weird sort of implied division, which is something I've never heard of. :P
I do believe there are some differences in interpretation—even math notation isn't perfect. (And it does seem to make sense to me for implied multiplication to have higher precedence, even though that's not usually included in PEMDAS.) In my experience, calculators usually had a list of operations in the printed manual (you know, back in the old days when they actually came with these dead tree things called “books” ;)), which varied from calculator to calculator.
The moral, it seems, is when dealing with subtraction and division, better be safe than sorry and use extra parentheses when in doubt. Or RPN, of course.
6 1 2 + 2 * / → 1
6 2 / 1 2 + * → 9
No ambiguity there!
-
No, the interpretation is ambiguous for calculators!
It may be ambiguous for calculators, but it certainly is the case that multiplication and division (the same class, just inverse operations) are the same level and are performed in the order in which they are read (left-to-right for much of the world). Following that comes addition and subtraction (again,inverse operations of the same class). It goes:
Parentheses (Includes [], (), and other structural notation, always at the top)
...
Pentation
Tetration
Exponentiation
Multiplication, Division (left to right)
Addition, Subtraction (left to right)
There are other operations higher than exponents, and those would ascend the chain as expected. Multiplication is repeated adding, exponents are repeated multiplication, tetration is repeated exponentiation, pentation is repeated tetration,and the hyperoperations (https://en.wikipedia.org/wiki/Hyperoperation) continue up. Subtraction and Division are binary operators that are neither associative (https://en.wikipedia.org/wiki/Associative_property) nor commutative (https://en.wikipedia.org/wiki/Commutative_property) and aren't really on the list, they are just special inverse operations that many people are familiar with.
-
An expression like 1/2x is interpreted as 1/(2x) by TI-82, but as (1/2)x by TI-83.
There can be ambiguity in the use of the slash symbol / in expressions such as 1/2x. If one rewrites this expression as 1 ÷ 2x and then interprets the division symbol as indicating multiplication by the reciprocal, this becomes: 1 ÷ 2 × x = 1 × ½ × x = ½ × x.
With this interpretation 1 ÷ 2x is equal to (1 ÷ 2)x. However, in some of the academic literature, multiplication denoted by juxtaposition (also known as implied multiplication) is interpreted as having higher precedence than division, so that 1 ÷ 2x equals 1 ÷ (2x), not (1 ÷ 2)x.
For example, the manuscript submission instructions for the Physical Review journals state that multiplication is of higher precedence than division with a slash, and this is also the convention observed in prominent physics textbooks such as the Course of Theoretical Physics by Landau and Lifshitz and the Feynman Lectures on Physics.
For this reason I agree that pure chain mode infix, RPN and text book algebraic entry on calculators/apps are much more defind and clear.
With ”command mode algebraic” entry you never know exactly what you will get.
-
Being older and wiser than I was in my last response, I maintain that RPN is the clear winner for performance, especially in an interpreted programming language, but infix is better for organization for humans.
Also @martinot, please edit your post instead of double posting.
-
Being older and wiser than I was in my last response, I maintain that RPN is the clear winner for performance, especially in an interpreted programming language, but infix is better for organization for humans.
Also @martinot, please edit your post instead of double posting.
I think it depends. Chain logic infix (as in four bangers or old calculators) is not always consequent and easy to use for some calculations.
If you do more advanced, or simpler calculations, it could be easier (and faster) with RPN, but I do agree that it needs to be understood first (not natural for a beginner).
I think that text book algebraic notation is probably the easiset entry for most people who is not accustomed to calculatots, but accustomed to mathematics.
Yes, I merged the comments to the first post, but could not find the ”delete”-button? Hade to empty the second post (or put in a ”.” as empty post was not allowed).
-
When in doubt add more parentheses to eliminate the ambiguity.
-
##6/2(1+2) =\ 6/2(3) =\ 6/6 =\ 1##
##\frac{6}{2(1+2)} =\ \frac{6}{2(3)} =\ \frac{6}{6} =\ 1##
This is due to how their division works. It's a fraction, not the ÷ symbol. So its 6 over 2(1+2) not six divided by 2(1+2). The way that TI-OS does it there is wrong according to that.
##6÷2(1+2) =\ 6÷2(3) =\ 3(3) =\ 9##
If we aren't treating it as a fraction then it is correc according to standard order of operations.
TI calculators interpret this just like any other interpreter or compiler would, it's CASIO that is wrong here. It's the only way that makes sense without natural expression display. The only difference is that the * operator is implicit.
This is how Python 3 does it:
>>> 6/2*(1+2)
9.0
When in doubt add more parentheses to eliminate the ambiguity.
(https://imgs.xkcd.com/comics/lisp_cycles.png)