Conversión de una expresión matemática (cadena) en variables utilizables

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)?

preguntado el 08 de noviembre de 11 a las 15:11

1 Respuestas

Echa un vistazo a 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.

respondido 08 nov., 11:20

so u dont know of any free allready made framework i can use? - user1033619

@user1033619: compiler tools are free - Dani

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.