Is there any third party jar files available for java6 math evaluation?
I want to calculate mathematical expression in java6开发者_StackOverflow中文版.for example,
c=a*b+((b/d)-c)/100-(h/2)
How to evaluate this math expression....
Please guide me get a solution...
Saravanan.P
JEP is a Java expression parser library.
Try JEP
By the way, JEP can still be downloaded (through an older version, but still) as a GPL licensed library here (See related question.)
** EDIT **
The JEP documentation is very well-written and contains a lot of examples.
i recently implemented a simple math expression evaluator on basis of Dijkstra's Shunting Yard Algorithm and released it under the Apache License 2.0.
you can check it out here: http://projects.congrace.de/exp4j/index.html
精彩评论