[Numpy-discussion] roots and high-order polynomial

Fabrice Silva silva at lma.cnrs-mrs.fr
Mon Jul 6 13:55:52 EDT 2009


Le lundi 06 juillet 2009 à 17:57 +0200, Fabrice Silva a écrit :
> Le lundi 06 juillet 2009 à 17:13 +0200, Nils Wagner a écrit :
> > IIRC, the coefficients of your polynomial are complex.
> > So, you cannot guarantee that the roots are complex 
> > conjugate pairs.
> 
> Correct! If the construction is done with X1 and X1* treated separately,
> the coefficients appear to be complex. But if their processing is done
> simultaneously, the combination gives real coefficients. Let me modify
> this point and come back to tell you if it is the breakpoint...

Alright, the coefficients are now all real (I still wonder how it passed
the check tests I have).

You can find attached a simple test. Looking at the evolution of a.r, it
seems there really is a trouble with the representation of high order
polynomial. 'a' is initialized with its roots, but a.r is far from equal
to the input roots...
-- 
Fabrice Silva
Laboratory of Mechanics and Acoustics - CNRS
31 chemin Joseph Aiguier, 13402 Marseille, France.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_roots.py
Type: text/x-python
Size: 388 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090706/50f72338/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_roots.png
Type: image/png
Size: 32222 bytes
Desc: 
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090706/50f72338/attachment.png>


More information about the NumPy-Discussion mailing list