Needed, symbolic math in Python

Ray Buvel rlbuvel at gmail.com
Sat Jun 12 14:41:00 EDT 2004


Paul Rubin wrote:

> Does Numeric make a way to divide one polynomial by another?
> 
> It occurs to me that I'd also like to do polynomial arithmetic over
> finite fields, i.e. in GF(2**n)[x] for small n.  I realize that's a new
> request but I wonder if you know of anything.  Thanks.

I don't think Numeric supports polynomial division.  However, I have a
couple of Python classes that implement polynomial arithmetic.  One is
generic and can be used with the gmpy (http://gmpy.sourceforge.net/) module
to get exact results.  Or, you can implement a class for the field of
interest to you.  The other class implements polynomials over the field of
the integers mod 2.

Both support the usual operations of + - * / % and also compute the
derivative.  The string representation shows the polynomial with x as the
variable.

These modules are too big to post so if anyone wants them, send me an email
requesting them.

Ray Buvel




More information about the Python-list mailing list