Xavier-François Roblot on 09 Sep 2002 15:43:56 +0200

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

Re: interesting ROUND4 behavior

> I found 3 polynomials, namely polzagier(18,3), polzagier(34,3) and
> polzagier(42,11), that behave funny when I run factorpadic(pol,2,r).
> I run it at \g5 and grep for 'bound for resultant coeffs:'.
> Xavier, any idea why ROUND4 behaves like that?

> Well, I do believe a bug explains this behavior. Indeed, taking
> pol=polzagier(18,3) 
> and looking at 
> factorback(factorpadic(pol,2,24))-pol 
> shows that the result of factorpadic is (very) wrong... I'll take a
> closer look next week. Thanks for pointing out the problem.

OK, so I was wrong. There is no bug, just an inefficiency. At some
point, when the precision is be too small, the algorithm starts working
over Z. That was an overkill, since it's better to just keep on doubling
the precision until it's large enough (and in general doubling once is
enough). So I've modified the code to do that. This should speed up
things on difficult examples. I do believe it does on Igor's. Anyway,
the computation involving the forever increasing 'bound for resultant
coeffs' has no disappeared, so I guess it solves the problem :o) The
corresponding changes have been committed to the CVS version. Please try

Now, concerning the behaviour of factorpadic, the function does not
return the factors normalized in such a way that factorback(factorpadic)
return the original polynomial (it does so only up to a unit) as does
factorpol when the polynomial to factor has integral coefficients and no
content. I plan to change it so that it behaves like factorpol, that is
factorback(factorpadic(pol,p,e)) will always return p^d.pol where d is
such that p^d.pol has (p-adically) integral coefficients and content
equal to 1. If no one complains about that or comes out with a better
solution in the next few days, I'll commit the changes.