0

I'm working on a problem where I need to parse a string math equation, and use RPN to solve it.

Is it possible to get the tokenization step, and node tree from another library like this: https://mathjs.org/docs/reference/functions/parse.html

And walk the node tree and solve it with RPN?

The reason I'm using RPN is because I'm doing some fancy stuff with percentages that I can't seem to figure out with regular infix notation.

GN.
  • 8,672
  • 10
  • 61
  • 126
  • What do you.mean by "solve"? Do you mean "evaluate"? Or do you really mean "solve" as in "find x such that x²+3=4"? Also, why use RPN if you have a parser which produces a parse tree? – rici Dec 22 '19 at 00:39
  • As in reduce it to one answer. – GN. Dec 22 '19 at 02:41

0 Answers0