0

I am trying to make an iPhone-app that does the Monte Carlo simulation on equations given by the user. I want the user to be able to input something like: "2x+(y^2)" and then recieve a result.

Is there a way to parse this string and get usable variables that i can do calculations on (a library u know of perhaps)?

user1033619
  • 1,757
  • 2
  • 11
  • 11

1 Answers1

0

Take a look on compiler tools. although it might be a bit bloated, it is easy to write any "language" in it even if its just for simple mathematical expressions.

Daniel
  • 30,896
  • 18
  • 85
  • 139