Calculator Community > Other Calculators

Why RPN?

<< < (3/4) > >>

TravisE:
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!

Xeda112358:

--- Quote from: supergems on February 03, 2016, 05:44:41 pm ---No, the interpretation is ambiguous for calculators!

--- End quote ---
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 continue up. Subtraction and Division are binary operators that are neither associative nor commutative and aren't really on the list, they are just special inverse operations that many people are familiar with.

martinot:
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.

Xeda112358:
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.

martinot:

--- Quote from: Xeda112358 on February 24, 2018, 10:31:47 am ---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.

--- End quote ---

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).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version