I am developing an Android application that I get a String with a mathematical expression that I need to calculate, I did this to convert the letters to the numbers I need, but what is the best way to evaluate this?
Nothing complicated, the formulas are the same:
((A * 2 + B * 3 + C * 5) / 10) + D
EDIT: Just found that the guy, a very simple API, works like a charm
http://code.google.com/p/symja/wiki/MathExpressionParser
source
share