Domain Name Forum  

Go Back   Domain Name Forum > Web Design & Development > Programming > C

Reply
 
Thread Tools Display Modes
  #1  
Old 03-23-2011, 01:08 PM
C++ C++ is offline
Senior Member
 
Join Date: Jun 2009
Posts: 18,248
Default 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 ^ +...
__________________
C++
domain name forum
Reply With Quote
  #2  
Old 07-26-2017, 11:58 AM
steffidsouza46 steffidsouza46 is offline
Member
 
Join Date: Jun 2017
Posts: 58
Default

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

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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

| Webmaster Forum | | Domain Name Forum |



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