Does there exist a Jar that solves Math Equation?
Hi Guys
I am recently working on a project that involves intensive math calculation, I want to be able to output numbers from a equation. Is there a Java library that support this function right now?
for example:
input:
y = 2x + 5
y = x
output:
y = -5
x = -5
Any comment or thoughts are appreciated.
Thank you
Re: Does there exist a Jar that solves Math Equation?
Have a look at the Apache commons math library. I haven't used it for this in particular, but probably has something in there worth trying.
Commons Math: The Apache Commons Mathematics Library
Re: Does there exist a Jar that solves Math Equation?
I would imagine that a lot depends on the sort of equations you are trying to solve. What characteristics do they have?
The example you gave is an example of a pair of simultaneous linear equations. Wikipedia discusses them and the article may shed light on the Apache library (and similar). The devil - even with such "simple" equations - lies in the details: in this case the way the implementation handles efficiency and numerical accuracy. The beginning programmer is little interested in these subtleties and could probably write their own code more quickly than master the library usage. If, however, you are after serious mathematical horsepower then using the library and testing your code will require thinking about the mathematics behind the library.
Re: Does there exist a Jar that solves Math Equation?
Quote:
Originally Posted by
copeg
Thanks for commenting, I've tried this from the Common Math library. The Commons Math User Guide - Linear Algebra and it works for linear equations. I wonder if they have a way for quadratic equations. Gonna look into it a bit more.