Re: [Numpy-discussion] roots and high-order polynomial

2009-07-08 Thread Fabrice Silva
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

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Fabrice Silva
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

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Fabrice Silva
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 co

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Nils Wagner
On Mon, 06 Jul 2009 16:53:42 +0200 Fabrice Silva wrote: > Le lundi 06 juillet 2009 à 08:16 -0600, Charles R Harris >a écrit : > >> Double precision breaks down at about degree 25 if >>things are well >> scaled, so that is suspicious in itself. Also, the >>companion matrix >> isn't Hermitean

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Fabrice Silva
Le lundi 06 juillet 2009 à 08:16 -0600, Charles R Harris a écrit : > Double precision breaks down at about degree 25 if things are well > scaled, so that is suspicious in itself. Also, the companion matrix > isn't Hermitean so that property of the roots isn't preserved by the > algorithm. If it w

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Charles R Harris
On Mon, Jul 6, 2009 at 8:16 AM, Charles R Harris wrote: > > > On Mon, Jul 6, 2009 at 3:44 AM, Fabrice Silva wrote: > >> Le vendredi 03 juillet 2009 à 10:00 -0600, Charles R Harris a écrit : >> >> > What do you mean by erratic? Are the computed roots different from >> > known roots? The connection

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Charles R Harris
On Mon, Jul 6, 2009 at 3:44 AM, Fabrice Silva wrote: > Le vendredi 03 juillet 2009 à 10:00 -0600, Charles R Harris a écrit : > > > What do you mean by erratic? Are the computed roots different from > > known roots? The connection between polynomial coefficients and > > polynomial values becomes s

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-06 Thread Fabrice Silva
Le vendredi 03 juillet 2009 à 10:00 -0600, Charles R Harris a écrit : > What do you mean by erratic? Are the computed roots different from > known roots? The connection between polynomial coefficients and > polynomial values becomes somewhat vague when the polynomial degree > becomes large, it is

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Pauli Virtanen
On 2009-07-03, Charles R Harris wrote: > roots? The connection between polynomial coefficients and polynomial values > becomes somewhat vague when the polynomial degree becomes large, it is > numerically ill conditioned. In addition to switching to higher precision than machine precision, anothe

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Dag Sverre Seljebotn
Fabrice Silva wrote: > Le vendredi 03 juillet 2009 à 11:52 +0200, Nils Wagner a écrit : >> You will need multiprecision arithmetic in that case. >> It's an ill-conditioned problem. > > I may have said that the solution are of the same order of magnitude, so > that the ratio between the lowest and

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Charles R Harris
On Fri, Jul 3, 2009 at 3:48 AM, Fabrice Silva wrote: > Hello > Has anyone looked at the behaviour of the (polynomial) roots function > for high-order polynomials ? I have an application which internally > searches for the roots of a polynomial. It works nicely for order less > than 20, and then h

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Fabrice Silva
Le vendredi 03 juillet 2009 à 14:43 +0200, Nils Wagner a écrit : > Just curious - Can you provide us with the coefficients of > your polynomial ? Working case : Polynomial.c = [ -1.34100085e+57 +0.e+00j -2.28806781e+55 +0.e+00j -4.34808480e+54 -3.27208577e+36j -2.44499178e+

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Nils Wagner
On Fri, 03 Jul 2009 14:26:39 +0200 Fabrice Silva wrote: > Le vendredi 03 juillet 2009 à 11:52 +0200, Nils Wagner a >écrit : >> You will need multiprecision arithmetic in that case. >> It's an ill-conditioned problem. > > I may have said that the solution are of the same order >of magnitude, s

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Fabrice Silva
Le vendredi 03 juillet 2009 à 11:52 +0200, Nils Wagner a écrit : > You will need multiprecision arithmetic in that case. > It's an ill-conditioned problem. I may have said that the solution are of the same order of magnitude, so that the ratio between the lowest and the highest absolute values of

Re: [Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Nils Wagner
On Fri, 03 Jul 2009 11:48:45 +0200 Fabrice Silva wrote: > Hello > Has anyone looked at the behaviour of the (polynomial) >roots function > for high-order polynomials ? I have an application which >internally > searches for the roots of a polynomial. It works nicely >for order less > than 20,

[Numpy-discussion] roots and high-order polynomial

2009-07-03 Thread Fabrice Silva
Hello Has anyone looked at the behaviour of the (polynomial) roots function for high-order polynomials ? I have an application which internally searches for the roots of a polynomial. It works nicely for order less than 20, and then has an erratic behaviour for upper values... I looked into the so