Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Infix to Reverse Polish notation

  1. Feb 28, 2012 #1
    I have to convert..


    to reverse polish notation

    I think it's...


    Is this correct?
  2. jcsd
  3. Feb 28, 2012 #2


    User Avatar
    Gold Member

    Looks right to me.
  4. Feb 28, 2012 #3


    User Avatar

    Staff: Mentor

    Yes, that's one way to do it (verified on my HP calculator that uses RPN).

    There are other ways, of course. For example, there's one that has the numbers in the sequence that they appear in the original infix expression. Can you figure that one out? It might be useful if you have to write a program that converts infix to RPN.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Similar Threads - Infix Reverse Polish Date
Reverse FFT of a ratio of two FFTs Dec 14, 2015
C++ prog. to reverse each word in sentence Nov 7, 2015
C reverse string in memory Sep 14, 2014
Using STACK and infix and postfix Apr 26, 2012
C++: Postfix to Infix Nov 30, 2007