String to Math function
Hi,
I am new to this forum so I don't know if this is the right place for his topic, if it is not please forgive me...thanks Ant0nisS
Now let's get in to the point...
I wanted to know if there any way to take a string(e.g. 2+5*(9+2*7/5))-sin(4/(2*(tan(60)))) and convert it into a math function to give me the result...please help me...if you think it is impossible please let me know...
thankss
[428 byte] By [
Ant0nisSa] at [2007-11-27 11:52:15]

programming it yourself is a lot of work for a beginner.
forget binary trees, ASTs, or even evaluation the parsing alone
can be daunting.
do a google search for terms like: java cas (computer algebra system)
math expression evaluators
http://www.google.com/search?hl=en&q=java+math+evaluator
this one is simple:
http://www.singularsys.com/jep/
eh, i didnt realize that singular systems guy switched the license
to proprietary. you can find many free opensource ones.
Guys thanks but i finally programmed it myself...:D...it was not that difficult...I am not a beginner I just didn't know where to post...
Thanks for your replies though...