Exploring the Use of Polish/Reverse Polish Notation

  • Thread starter Nidum
  • Start date
  • Tags
    Notation
In summary, the conversation discusses the use of Polish and reverse Polish notation for computational formulae. The speakers share their experiences with these notations, including using them for number crunching and in calculators. They also mention various models of calculators and other devices that use these notations.
  • #1
Nidum
Science Advisor
Gold Member
2,993
853
This thread follows on from : https://www.physicsforums.com/threa...ot-worthy-of-maths-forum.880724/#post-5534559 .

Anybody ever used Polish notation or reverse Polish notation for computational formulae ? Use of either is supposed to eliminate ambiguity and make the flow of computations logical .

I only ask out of curiosity . The very expensive HP programmable calculator we had at Mtu during the late 1970's had reverse Polish notation input . That is the only real world use I have ever come across .
 
  • Like
Likes Pepper Mint
Physics news on Phys.org
  • #2
I still have the HP 11C I bought in college in 1982. It still works great, and you got to love RPN.
 
  • Like
Likes Nidum
  • #3
RPN is a tool of trade of the serious number crunching scientist. I'm sure there would be plenty of apps featuring a RPN calculator for whatever tablet you own. The RPN calculator keypad doesn't need an equals sign nor parentheses, i.e., "(" and ")".

To evaluate 6 × (7 - 2 ÷ 3) + 5 you would typically enter the keystrokes in this order:
6 7 2 3 ÷ - × 5 +

Maybe you can see why this is also known as post-fix notation?

If you have access to linux, you'll find that the utility known as "dc" is a commandline RPN calculator. (It is also of unlimited precision, meaning you can set it to give you an answer to thousands of sig figs.)
 
  • Like
Likes Nidum
  • #4
You can still find the HP35s, and another model, I don't remember the name now, for financial calculations.
Besides, and for nostalgics, you have the 'SwissMicros': https://www.swissmicros.com/
To my knowledge, there are no other brands of RPN calculators. Well, perhaps in Russia... In Soviet times, there used to be a few models...
 
  • #5
NTW said:
You can still find the HP35s, and another model, I don't remember the name now, for financial calculations.
Besides, and for nostalgics, you have the 'SwissMicros': https://www.swissmicros.com/
To my knowledge, there are no other brands of RPN calculators. Well, perhaps in Russia... In Soviet times, there used to be a few models...
I think TI calculators used it, too, as far as I remember. And it's useful to know, when it comes to pushdown automatons.
 
  • #7
I still own an HP 49-G that uses RPN. I never use it anymore, though, since I have Mathematica on my laptop
 
  • #8
fresh_42 said:
I think TI calculators used it, too, as far as I remember. And it's useful to know, when it comes to pushdown automatons.

Before I bought my first HP11C in 1982, I used TI calculators. They were not RPN. Maybe they changed over the years.
 
  • #9
NTW said:
You can still find the HP35s, and another model, I don't remember the name now, for financial calculations.
Besides, and for nostalgics, you have the 'SwissMicros': https://www.swissmicros.com/
To my knowledge, there are no other brands of RPN calculators. Well, perhaps in Russia... In Soviet times, there used to be a few models...

That would be the HP 12C, I had one of those too when I was in the MBA program.
 
  • #13
Begin off-topic

Casio and Sharp had basic-programmable calculators.

End off-topic
 

1. What is Polish/Reverse Polish Notation (PN/RPN)?

Polish/Reverse Polish Notation is a mathematical notation in which operators follow their operands. In PN, operators are written before their operands, while in RPN, operators are written after their operands. This notation is used as an alternative to the more common infix notation, where operators are placed in between operands.

2. What are the advantages of using PN/RPN?

PN/RPN has several advantages, including reducing the need for parentheses and clarifying the order of operations. It also allows for easier implementation in computer programs and can be evaluated using a simple stack structure.

3. How is PN/RPN used in scientific and engineering calculations?

PN/RPN is commonly used in scientific and engineering calculators, as it allows for quick and efficient calculations without the need for parentheses. It is also used in programming languages, such as Forth and PostScript, for its simplicity and ease of implementation.

4. What are some common mistakes made when using PN/RPN?

One common mistake is not properly understanding the order of operations in PN/RPN, which can lead to incorrect results. Another mistake is forgetting to include all necessary operators and operands in the expression, which can also result in incorrect calculations.

5. Are there any disadvantages to using PN/RPN?

One disadvantage of PN/RPN is that it can be difficult for those who are used to infix notation to understand and use. It also requires more effort to write and read, which can be a barrier for beginners. Additionally, PN/RPN does not have a standard notation for functions, making it less versatile in certain mathematical operations.

Similar threads

  • Quantum Physics
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
17
Views
2K
  • Special and General Relativity
Replies
1
Views
970
  • STEM Academic Advising
Replies
1
Views
1K
Replies
2
Views
2K
Replies
2
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
276
Back
Top