Hello!

Chapter 6 of the Elementary Algorithms volume by Cohen[1] covers basic algorithms for manipulation of polynomial expressions. I've added libraries which implement some of these techiques. Here's a couple of examples from the unit tests:

(test-equal "EA: Example 6.43"

            (collect-terms (alge " 2 a x y + 3 b x y + 4 a x + 5 b x ")
                           '(x y))

            (alge " (2 a + 3 b) x y + (4 a + 5 b) x ")

            )

(test-equal "EA: 6.34"

            (algebraic-expand (alge " (x+2) * (x+3) * (x+4) "))

            (alge " x^3 + 9 x^2 + 26 x + 24 ")

            )

As is mentioned in the books, the algorithms presented have some limitations. Sometimes the exercises cover extensions to overcome these limitations. Currently, most of the libraries only offer the basic algorithms without the extensions. In this respect, it's not a bad foundation for those who want to explore the ideas in the book but don't have enough time to cook up all the pre-requisite MPL code.

The full unit tests file can be browsed at:

    http://github.com/dharmatech/mpl/raw/master/test.sls

All tests pass in Ikarus, Ypsilon, and Mosh.

There's been a slight change in the dependencies. See the README for details:

    http://github.com/dharmatech/mpl/raw/master/README

To check out the repository:

    $ git clone git://github.com/dharmatech/mpl.git

Ed

[1] Computer Algebra and Symbolic Computation: Elementary Algorthms
    by Joel S. Cohen

Reply via email to