Re: any Python equivalent of Math::Polynomial::Solve?

2005-02-26 Thread John M. Gamble
In article [EMAIL PROTECTED],
Just  [EMAIL PROTECTED] wrote:
While googling for a non-linear equation solver, I found 
Math::Polynomial::Solve in CPAN. It seems a great little module, except 

Thank you.

it's not Python... 

Sorry about that.

   I'm especially looking for its poly_root() 
functionality (which solves arbitrary polynomials). Does anyone know of 
a Python module/package that implements that?

Are you looking for that particular algorithm, or for any
source that will find the roots of the polynomial?  The
original source for the algorithm used in the module is
from Hiroshi Murakami's Fortran source, and it shouldn't
be too difficult to repeat the translation process to python.

-- 
-john

February 28 1997: Last day libraries could order catalogue cards
from the Library of Congress.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: any Python equivalent of Math::Polynomial::Solve?

2005-02-26 Thread John M. Gamble
In article [EMAIL PROTECTED],
Just  [EMAIL PROTECTED] wrote:

Heh, how big are the odds you find the author of an arbitrary Perl 
module on c.l.py...


Hey, that's why it's called lurking.


Any will do. As I wrote in another post, I'm currently only looking for 
a quintic equation solver, which your module does very nicely.

 The
 original source for the algorithm used in the module is
 from Hiroshi Murakami's Fortran source, and it shouldn't
 be too difficult to repeat the translation process to python.

Ah ok, I'll try to locate that (following the instruction in Solve.pm 
didn't work for me :( ).


Ouch.  I just did a quick search and found that that site has undergone
a few changes, and the code that i reference is missing.  A few other
links in the docs are stale too.  I need to update the documentation.

Anyway, doing a search for 'hqr' and Eispack got me a lot of sites.
In particular, this one is pretty friendly:

http://netlib.enseeiht.fr/eispack/

Look at the source for balanc.f (does the prep-work) and hqr.f
(does the solving).  Minor annoyance: the real and imaginary
parts of the roots are in separate arrays.  I combined them into
complex types in my perl source, in case you want to make a
comparison.

Of course, all this may be moot if the other suggestions
work out.

-- 
-john

February 28 1997: Last day libraries could order catalogue cards
from the Library of Congress.
-- 
http://mail.python.org/mailman/listinfo/python-list