I apologize if this is the wrong forum. It seemed like a catchall category and this is a general question.
I'm writing a calculator and am thinking about how to implement order of operations. Infix notation seems like a pain to get order of operations implemented. Postfix seems like a much nicer alternative. Would you suggest using postfix notation or something different?
Along the same lines of the question, how would you parse something like 3+sin(40)-(4*5)? The sin seems like a bit of a stumbling point.
I'm writing a calculator and am thinking about how to implement order of operations. Infix notation seems like a pain to get order of operations implemented. Postfix seems like a much nicer alternative. Would you suggest using postfix notation or something different?
Along the same lines of the question, how would you parse something like 3+sin(40)-(4*5)? The sin seems like a bit of a stumbling point.