ratfun-2.3 Polynomials and Rational Functions

Raymond L. Buvel levub137 at wi.rr.com
Sat Aug 19 17:21:35 EDT 2006


Bas wrote:
> Are there any differences between this module and the one already
> present in numpy?
> 
> http://www.scipy.org/doc/numpy_api_docs/numpy.lib.polynomial.html
> 
> Cheers,
> Bas
> 

Yes, there are quite a few.  This module uses a multi-precision library
(clnum) to make the calculations more precise.  This makes the root
finder significantly more precise.  There is an example in the user
manual that shows the difference in performance between Numeric
(essentially the same code as in numpy) and the ratfun root finder on an
ill-conditioned polynomial.

If you choose to use exact coefficients (integers and rationals) then
all calculations except for root finding are exact.

Unlike the numpy implementation, arithmetic (+-*/**) uses the standard
Python operators instead of requiring you to call functions.

Ray



More information about the Python-list mailing list