views:

29

answers:

1

Hi,

We have need in our product to do partial evaluation to simplify expressions that contain both variables and constants. Goal is to combine terms algebraically to reduce the constants whenever possible. For example the following expressions:

4x + 6y + 2x
7 + 2x - 3
10^-5 * x * 10^-4

Should become (respectively):

6(x + y)
4 + 2x
10^-9 * x

Please suggest any existing free software packages that we might use to accomplish this. This is for a commercial product, so restrictive GPLs can't be used.

Thanks.

-William

+2  A: 

I think it will be very hard to find such a tool.

http://en.wikipedia.org/wiki/Comparison%5Fof%5Fcomputer%5Falgebra%5Fsystems

Here you get a comparaison. If you want it free (as beer) and being able to reuse in propetary software, then only Mathomatic and Axiom seem to fit. I don't know them, I don't know if you can easily re-use them in a library.

And othen solution, is to use a GPL software (like maxima) giving an input file and parsing the output file. This won't go against the GPL as you don't link against it. But, it's a very ugly way to get it done.

Tristram Gräbener