Java Mathematic expression evaluator

June 9, 2008

For a program I’m working on these days I found this very useful library for evaluating mathematic expression.

Its name is meval. I found really little discussion about it on the net, despite it seemed very good to me. Of course, it’s a KISS library :)

Here’s how to use it:

import com.primalworld.math.MathEvaluator;
...
MathEvaluator m = new MathEvaluator("-5-6/(-2) + sqr(15+x)");
m.addVariable("x", 15.1d);
System.out.println( m.getValue() );

That’s all. Pretty easy, pretty good! A new great tool on my KISS Java bag!

Entry Filed under: development, java, mission, opensource. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Mission plan

June 2008
M T W T F S S
« May   Jul »
 1
2345678
9101112131415
16171819202122
23242526272829
30  

Recent Posts

Top Clicks

RSS News from JUG Sardegna

Links

Blogroll