Domain Name Forum

Domain Name Forum (http://www.domainnameforum.org/index.php)
-   C (http://www.domainnameforum.org/forumdisplay.php?f=124)
-   -   Algorithm help on converting infix expression to postfix (http://www.domainnameforum.org/showthread.php?t=151475)

C++ 03-23-2011 02:08 PM

Algorithm help on converting infix expression to postfix
 
I found numerous examples on converting infix expression to postfix expression but my program needs to include some functions like sqrt(x), min/max(x,y), fact(x), abs(x). abs(-5) is converted to -5 abs 120 – (45+3) is converted to 120 45 3 + - (3^2 + 4^5)*fact(3) is converted to 3 2 ^ 4 5 ^ +...

steffidsouza46 07-26-2017 12:58 PM

To evaluate any arithmetic expression we convert the infix expression to postfix. Then evaluate the postfix expression using a stack.


All times are GMT -4. The time now is 06:40 PM.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.