Arithmetic Expression Evaluation using Reverse Polish Notation (RPN)
A mathematical expression is usually expressed in infix notation. For evaluation purposes, we can change it to postfix (reverse polish) notation (using algorithms like Shunting-Yard ) and then evaluate the postfix notation using stack. I found out that calculators use this technique, but do today's modern compilers use this for arithmetic expression evaluation? Is it efficient enough or other techniques (or algorithms) are being used? To answer this question let's focus on the concepts you mention, infix notation , Shunting-Yard and evaluation and then relate them to compiling. To start with