Bill Allombert on Tue, 23 Oct 2001 17:04:26 +0200

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

Re: roots function

Le Sat, Oct 20, 2001 at 09:01:43AM +0200, Jean-Marc Sac-Epée écrit :
> 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:
> ? polroots(p)
> %3 = [-2.000617441803038056259607547 + 0.E-28*I, -1.998628388494694273362924261+ 0.E-28*I, -1.992194706025025355055438852 + 0.E-28*I,
> But in library mod, it's quite different. With a program such that
> output(pol);
> roots(pol,prec);
> one get
>   ***   non positive argument in mplog.
>   ***   Error in the PARI system. End of program.
> I also tried with older pari version (2.1.0, 2.1.1) and I got the same problem.
[bill](I shortened the quote to make it more readable)

I am not sure it is a library-only problem. In fact it is almost impossible
the way gp works, almost all code is in the library. The main difference is
that gp read a startup file and not pari_init, so you may get
different options set.

On my machine I can reproduce it under GP as well.

parisize = 4000000, primelimit = 500000
? allocatemem(16*10^6)
? \r~/tmp/pol
? polroots(%)
  ***   non positive argument in mplog.

(I have try higher prec, more or less memory, with same bug)