Jean-Marc Sac-Epée on Sat, 20 Oct 2001 09:01:47 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

roots function


Hi,

I have strange problems when using roots function with some peculiar polynomials. With most polynomials, roots is OK, but I can show some examples which stop the program.
Under gp, there is never any problem:

                    GP/PARI CALCULATOR Version 2.2.1 (alpha)
                i686 running linux (ix86 kernel) 32-bit version
                (readline v4.0 enabled, extended help available)
 
                       Copyright (C) 2000 The PARI Group
 
PARI/GP is free software, covered by the GNU General Public License, and
comes WITHOUT ANY WARRANTY WHATSOEVER.
 
Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.
 
   realprecision = 28 significant digits
   seriesprecision = 16 significant terms
   format = g0.28
 
parisize = 4000000, primelimit = 500000

p = x^91 - 90*x^89 + 3915*x^87 - 109651*x^85 + 2222410*x^83 - 34734503*x^81 + 435607741*x^79 - 4503826419*x^77 + 39144232269*x^75 - 290174518350*x^73 + 1855183900059*x^71 + x^70 - 10318557891519*x^69 - 70*x^68 + 50272175199446*x^67 + 2345*x^66 - 215709585501822*x^65 - 50050*x^64 + 818672616837720*x^63 + 764400*x^62 - 2757496474215689*x^61 - 8895264*x^60 + 8264415303589369*x^59 + 82003215*x^58 - 22082169538199201*x^57 - 614745190*x^56 + 52673266950073400*x^55 + 3817369325*x^54 - 112257760120807230*x^53 - 19900384350*x^52 + 213830416464800607*x^51 + 87959698827*x^50 - 364000799915443831*x^49 - 332051251350*x^48 + 553450622340203293*x^47 + 1076304056099*x^46 - 750892575358568225*x^45 - 3006679346954*x^44 + 907804320724608561*x^43 + 7255914953761*x^42 - 976170087843847905*x^41 - 15145073383258*x^40 + 931499753349442289*x^39 + 27345271287685*x^38 - 786607519056767453*x^37 - 42671976520862*x^36 + 585889915650971950*x^35 + 57443042034238*x^34 - 383412039816181162*x^33 - 66512983009132*x^32 + 219445239708257292*x^31 + 65980837942580*x^30 - 109264228384661199*x^29 - 55785443502360*x^28 + 47032511704607230*x^27 + 39937092074754*x^26 - 17372776849730812*x^25 - 24013624601460*x^24 + 5458257561901064*x^23 + 12006344586990*x^22 - 1443182694870736*x^21 - 4930111220917*x^20 + 316959064765389*x^19 + 1637212056515*x^18 - 56892580794590*x^17 - 431245908120*x^16 + 8176718241389*x^15 + 87877401165*x^14 - 916480647217*x^13 - 13403192985*x^12 + 77380824831*x^11 + 1461850533*x^10 - 4695932624*x^9 - 106649180*x^8 + 191653224*x^7 + 4680775*x^6 - 4752838*x^5 - 102499*x^4 + 59860*x^3 + 796*x^2 - 243*x - 2
 

? polroots(p)
%3 = [-2.000617441803038056259607547 + 0.E-28*I, -1.998628388494694273362924261+ 0.E-28*I, -1.992194706025025355055438852 + 0.E-28*I, -1.9824355679758002296438
20685 + 0.E-28*I, -1.975731603471644819620749745 + 0.E-28*I, -1.9628415553543261
42924608774 + 0.E-28*I, -1.942991910409844949872646987 + 0.E-28*I, -1.8986604079
99640728364685967 + 0.E-28*I, -1.864964597855355843834226614 + 0.E-28*I, -1.8584
89824496362520276956153 + 0.E-28*I, -1.818919405372753699440602485 + 0.E-28*I, -
1.780597255587203063225610436 + 0.E-28*I, -1.762423759852347212704243887 + 0.E-2
8*I, -1.716528282201851859028160323 + 0.E-28*I, -1.666204466047419021649099685 +
 0.E-28*I, -1.568733833851338946307946923 + 0.E-28*I, -1.49346788484335760073084
8137 + 0.E-28*I, -1.343829013605388043567161224 + 0.E-28*I, -1.26036771721694594
8457404893 + 0.E-28*I, -1.205989515752416341513982139 + 0.E-28*I, -1.07766857322
7181992199355674 + 0.E-28*I, -0.9022235779005171999722875488 + 0.E-28*I, -0.8654
775784491289656486915211 + 0.E-28*I, -0.7577502734730322854695007299 + 0.E-28*I,
 -0.5253214590009147225517274117 + 0.E-28*I, -0.4091411308746811295001009890 + 0
.E-28*I, -0.3664506843845321092702090236 + 0.E-28*I, -0.204300366129026919942214
8917 + 0.E-28*I, -0.08376436224098282241715395277 + 0.E-28*I, -0.008147388257143
954847944797048 + 0.E-28*I, 0.08453264860302305054310400382 + 0.E-28*I, 0.154854
7560784322764665798265 + 0.E-28*I, 0.2090026615563212884323070619 + 0.E-28*I, 0.
3243559953600765992332183558 + 0.E-28*I, 0.5399956016041592001875810059 + 0.E-28
*I, 0.6304687378697221354150117865 + 0.E-28*I, 0.7142334436250277692869575287 +0.E-28*I, 0.8048018352412090831484189612 + 0.E-28*I, 0.9250110298145331078903058
113111950014048374394085278*I, 1.281333657131100947580951877 - 0.05113111950014048374394085279*I, 1.464653585827005919578263694 - 0.008029972600943467256459953333*I, 1.464653585827005919578263694 + 0.008029972600943467256459953332*I, 1.931202302041692232261229822 - 0.009733889298176065924851565827*I, 1.931202302041692232261229822 + 0.009733889298176065924851565827*I, 1.975228418108854220084266840
- 0.009825424277222070958257041870*I, 1.975228418108854220084266840 + 0.009825424277222070958257041870*I, -0.5997023476261389434118996446 + 0.2291792017153677402263748636*I, -0.5997023476261389434118996446 - 0.2291792017153677402263748636*I, -0.6390330055857862145585648119 + 0.03353100833134348253855784567*I, -0.6390330055857862145585648119 - 0.03353100833134348253855784567*I, -1.001201775179751650690265196 + 0.02156161997906443228057551618*I, -1.001201775179751650690265196 - 0.02156161997906443228057551618*I, -1.208124395801396468797546328 + 0.04146062998824345417628580427*I, -1.208124395801396468797546328 - 0.04146062998824345417628580427*I, -1.438496555336377333487188390 - 0.01302622728461001310020821696*I,
-1.438496555336377333487188390 + 0.01302622728461001310020821696*I, -1.612994443087614003395820594 - 0.01368739128556161566189004811*I, -1.612994443087614003395820594 + 0.01368739128556161566189004811*I, -1.930636793237941218431846753 - 0.009437185791222996338099419592*I, -1.930636793237941218431846753 + 0.009437185791222996338099419592*I]~
 

But in library mod, it's quite different. With a program such that
.
.
.
output(pol);
roots(pol,prec);
.
.
.

one get

x^91 - 90*x^89 + 3915*x^87 - 109651*x^85 + 2222410*x^83 - 34734503*x^81 + 435607741*x^79 - 4503826419*x^77 + 39144232269*x^75 - 290174518350*x^73 + 1855183900059*x^71 + x^70 - 10318557891519*x^69 - 70*x^68 + 50272175199446*x^67 + 2345*x^66 - 215709585501822*x^65 - 50050*x^64 + 818672616837720*x^63 + 764400*x^62 - 2757496474215689*x^61 - 8895264*x^60 + 8264415303589369*x^59 + 82003215*x^58 - 22082169538199201*x^57 - 614745190*x^56 + 52673266950073400*x^55 + 3817369325*x^54 - 112257760120807230*x^53 - 19900384350*x^52 + 213830416464800607*x^51 + 87959698827*x^50 - 364000799915443831*x^49 - 332051251350*x^48 + 553450622340203293*x^47 + 1076304056099*x^46 - 750892575358568225*x^45 - 3006679346954*x^44 + 907804320724608561*x^43 + 7255914953761*x^42 - 976170087843847905*x^41 - 15145073383258*x^40 + 931499753349442289*x^39 + 27345271287685*x^38 - 786607519056767453*x^37 - 42671976520862*x^36 + 585889915650971950*x^35 + 57443042034238*x^34 - 383412039816181162*x^33 - 66512983009132*x^32 + 219445239708257292*x^31 + 65980837942580*x^30 - 109264228384661199*x^29 - 55785443502360*x^28 + 47032511704607230*x^27 + 39937092074754*x^26 - 17372776849730812*x^25 - 24013624601460*x^24 + 5458257561901064*x^23 + 12006344586990*x^22 - 1443182694870736*x^21 - 4930111220917*x^20 + 316959064765389*x^19 + 1637212056515*x^18 - 56892580794590*x^17 - 431245908120*x^16 + 8176718241389*x^15 + 87877401165*x^14 - 916480647217*x^13 - 13403192985*x^12 + 77380824831*x^11 + 1461850533*x^10 - 4695932624*x^9 - 106649180*x^8 + 191653224*x^7 + 4680775*x^6 - 4752838*x^5 - 102499*x^4 + 59860*x^3 + 796*x^2 - 243*x - 2
  ***   non positive argument in mplog.
  ***   Error in the PARI system. End of program.
 

I also tried with older pari version (2.1.0, 21.1) and I got the same problem.

JM

 

-- 
Jean-Marc Sac-Epée, Ingénieur de Recherches,    ("\-''-/").___..--''"`-.
Laboratoire de Mathématiques, Université de Metz,(`@_ @  )   `-.  (     ).`-.__.`)
Tél 03 87 54 72 69                                (_Y_.)'  ._   )  `._ `. `-..-''
Fax 03 87 31 52 73                                 `--'_..-_/  /--'_.' ,'
mail jmse@poncelet.univ-metz.fr