nothing really

Started by
13 comments, last by creedance 24 years, 1 month ago
Hi all. I just felt like posting because I've got a new signature that I've gotta try out. I do have a quick question, though, for anyone who can answer it... I went to WYSE (world youth in science and engineering) contest today (yes, i'm a youngin'). I was really frustrated because I could have advanced on to state if I had only 3 more correct answers. *sigh* Anyhow, there were a few questions that really bugged the hell outa me. I just need to know - "WHAT IS REVERSE POLISH NOTATION!!!" "If at first you don't succeed... destroy all evidence of ever trying." Edited by - creedance on 3/20/00 11:14:20 PM
"If at first you don't succeed... destroy all evidence of ever trying"
Advertisement
Any good computer class should teach that to you, or assembly book.

it looks something like this... remeber I''m just making the numbers up.

-+*334

Don''t have time to get into it today, maybe tomarrow I will post you all the details. Unless someone else beats me to it.
William Reiach - Human Extrodinaire

Marlene and Me


Infix notation: 2 + 3
Postfix notation (aka Reverse Polish): 2 3 +

The operator comes after both operands.

There''s also prefix notation: + 2 3






Mason McCuskey
Spin Studios - home of Quaternion, 2000 GDC Indie Games Fest Finalist!
www.spin-studios.com
Founder, Cuttlefish Industries
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!
Reverse polish (and prefix for that matter) is important because it lays out operations without need for parenthesis as grouping. The postfix implicitly implies the grouping necessary.

2 3 + means (2 + 3)
2 3 + 4 * means (2 + 3) * 4
1 2 3 + 4 * / mean 1 / ( (2 + 3) * 4) )

Conceptually everytime you see a number you put it on the stack. And every time you see an operator you pop off the top two numbers, and replace them with a new number.

Taking the last example:
See 1:
put it on the stack.
Stack : 1

See 2:
put it on the stack.
Stack : 1 2

See 3:
put it on the stack
Stack : 1 2 3

See +:
pop 2 and 3, add them and place the sum on the stack
Stack : 1 5

See 4:
put it on the stack
Stack : 1 5 4

See *:
pop 5 and 4, multiply them and place the product on the stack
Stack: 1 20

See /:
pop 1 and 20, divide them and place the quotient on the stack
Stack: 0.05
btw, (and completely off topic) are you in Illinois? Or has WYSE finally branched out? (When I did it, it was still called JETS.)
Hey, thanx everyone for your help. Hehe. My school has no computer class - I had to learn everything on my own. Surprising that I got a fourth at sections (second at regionals).

I didn''t know that it was used in stacks, that''s cool.

Yes, I''m from Illinois, but they don''t call it JETS anymore. A lot of people still refer to it as TEAMS, tho.

Thanx again.

"If at first you don't succeed... destroy all evidence of ever trying"
"If at first you don't succeed... destroy all evidence of ever trying"
I tought everone one knew that what are progamers coming tooo......... Aah the golden days of people who had BRAINS!!!!!!!!

"Don't Blame us, blame yourself or God"

FFT
"Don't Blame us, blame yourself or God" FFT
Hmm. And yet, there were at least nine spelling and grammar errors in your post, including one in your signature.

Not that I care: I just felt like fighting back for creedance.


Lack

Christianity, creationism, metric, Dvorak, and BeOS for all!
Lack
Christianity, Creation, metric, Dvorak, and BeOS for all!
I had the pleasure of rocking my state in computer science a couple times in WYSE ...you must live in the midwest, i think wyse is only in illinois and wisconsin and indiana...Well anywho, RPN is a great way to do calculations, its the way that calculators think.

They already gave you the syntax up there i guess...buy an hp 48gx, its an RPN calculator..youll be a happy happy man.

Oh, and for the record, WYSE is worldwide youth in science and engineering ..it says so on my championship t-shirt



Edited by - firahs on 3/24/00 3:16:33 PM
Muffins:

I don't mean to be rude, but I'm sure that you were not born into this world spitting out reverse polish notation. My school doesn't offer serious computer classes, so I must learn everything on my own. So please don't rub it in my face.

Lack:

Thanks. =)

firahs:

You won in your state? Cool! Yes, I'm from IL. I was really hoping to go to state (I got fourth at regionals, and I had to get a second or first to advance to state). I had 24 out of 30 correct on my test; I think I might have done better had the test been harder. They didn't even have any recursion problems and I'm not even sure if there were any problems with stacks/queues, but I wish there were. Being so easy made it too easy for the test to be decided by having a few good guesses. Oh well.

"If at first you don't succeed... destroy all evidence of ever trying"

Edited by - creedance on 3/24/00 3:27:26 PM
"If at first you don't succeed... destroy all evidence of ever trying"

This topic is closed to new replies.

Advertisement