[Numpy-discussion] roots and high-order polynomial

Fabrice Silva silva@lma.cnrs-mrs...
Mon Jul 6 13:33:31 CDT 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.scipy.org/pipermail/numpy-discussion/attachments/20090706/676e4da2/attachment-0001.py 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: teste_roots.png
Type: image/png
Size: 16335 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090706/676e4da2/attachment-0001.png 


More information about the NumPy-Discussion mailing list