in reply to minimizing simple linear equations

Math::Algebra::Symbols does a pretty good job if it doesn't get too complicated:
use Math::Algebra::Symbols my ($foo) = symbols(qw(foo)); my $result = ($foo * 2) + ($foo * 3); print "$result\n";
prints

    5 * $foo

Here's an article on it.

Replies are listed 'Best First'.
Re^2: minimizing simple linear equations
by beemshake (Novice) on Mar 14, 2006 at 00:35 UTC
    Thanks for all the tips. I think Math::Algebra::Symbols was what I was looking for, but by the time I found it I had already written the script to just run the equations through mathomatic to simplify them.