Problem with evaluation expressions with exponents

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
nameVoid
Messages
238
Reaction score
0
The way i am evaluating post fix expressions is not working with exponents

Example
InfixII
3*(4^2-2/3)+4
To post fix
342^*23/-4+

=16*3-2/3)+4

Am i evaluating the parenthesis the wrong way
 
Physics news on Phys.org
Yes, you first need to evaluate 4^2 - 2/3. Then multiply that by 3.