What is Reverse Polish Notation (AKA Postfix Notation)? Why is it Important?

preview_player
Показать описание
This is the first in two videos about the Shunting-Yard Algorithm. This famous algorithm converts infix notation math expressions to postfix (or reverse polish notation) expressions. But why would it do that? What is the point? Let's find out.
---

#garyexplains
Рекомендации по теме
Комментарии
Автор

Back when I was in engineering school, HP calculators were the rage. The HP-28C was released but I couldn't afford one then. When the -28S was released, I saved up my money and bought one and was very happy with it... but then the -48SX was released just a couple months after I got the -28S. Luckily for me, HP had a trade-in program so I got the -48SX. It has been a good calculator. It still sits on my desk and I use it occasionally to this day. I remember writing all kinds of programs for it... teachers usually had the stance of "if you can write a program to do it, you probably understand the problem well enough".

shanehebert
Автор

HP introduced the HP35 as the “ electronic slide rule” in about ‘73, while is was studying engineering. With much scrimping and saving I was able to buy on late that year. The RPN was diff at first but very soon became second nature. That device made a huge difference in that I was more able to focus on understanding the material rather than the mechanics of the computations.
Thanks for the video!

jeraldgooch
Автор

When I was in high school in the mid 90s I had a HP48G calculator. It was RPN, which quickly became my preference. I still have it today.

dono
Автор

Still have my HP 48 and I love Droid 48. Rpl is an easy stack language.

jk-mmto
Автор

My first computer was a Wireless World Comp 80 kit which used BURP (Basic Using Reverse Polish).

GGUO
Автор

I first came across RPN back in the early 80;s when I had a fig-Forth implementation on my Dragon 32 computer. The 6809 was a great processor for running RPN as it had SSP & USP as well as X & Y index Happy days

Louise-bk
Автор

Got myself the HP-48 SX at school. The Droid48 app for Androids gets my friends a chuckle, "oh you're on top of things"..

randreas
Автор

I have an HP 32SII which may be almost 30 years old. It is now my the calculator I use in my shop. It took awhile to get used to HP's RPN but once learned, it was easy to use. No parenthesis.
This was an interesting explanation of RPN. I did not know the terms Infix or Postfix before so a lot to be learnt in this video.

lv_woodturner
Автор

That is why HP used to have RPN calculators.

SurfinScientist
Автор

Thanks for this video! this make a lot easier everything for me! Very good explanation thanks again!

mohsenzare
Автор

While I had gotten through college with a slide rule I receive a Sinclair calculator from my younger brother who could not abide by Reverse Polish Notation RPN. However, I was sold immediately. A few years later, when I obtained my first computer with the CPM operating system I purchased an interpreter for SL5, a dialect of Forth, which is a computer language built around RPN. Forth dominated my next 10-15 years of programming. Even today, I use the GNU Galculator in RPN mode. Fossils like me will pass on eventually, leaving the world to the infix crowd.

The primary drawback of postfix, or RPN, is the software writer must pay attention to the order of the parameters pushed to the stack. A lot of POP, SWAP and ROTATE actions are in one's future if the order of pushing is not carefully considered.

mrhickman
Автор

Can't program in forth without RPN. And considering forth is one of the three best languages to work in, I'm super grateful for it.

antinatalope
Автор

Hi Gary, very interesting. First time hearing infix and post/polish fix.
Is there a danger with these systems of someone interpreting these completely wrongly? Or a way of seeing code and knowing its one system and not the other. Clearly no "brackets " is a big giveaway?
Love your knowledge and desire to up-skill. Thanks for all you do.👍👍

danielcookeb
Автор

In some sense, postfix is how a CPU evaluates things. Consider
load r1, [100]
load r2, [200]
add r3, r1, r2
so the operation instruction comes _after_ the instructions to fetch the operands.

Chalisque
Автор

CSC101...that brings me down memory lane. :-)

test
Автор

Used RPN when I wrote Forth programs for safety systems in the 1980's...

johngrwf
Автор

The Sinclair scientific had rpn back in 1978s

taipo
Автор

HP vs texas instruments calculator in sciences school!😂

christiantheophanegasore
Автор

The answer in your thumbnail is 42...I mean 7. 😂

tonifasth