| Bill Allombert on Wed, 04 May 2022 14:50:47 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: slow factor |
On Wed, May 04, 2022 at 08:20:53PM +0800, Zhao Li wrote:
> Thank you.
>
> It looks that the priority really matters. However, how should we
> determine which one has higher priority, since we have seen another
> example which can be only be solved when ieta has higher priority.
Yet another bug to fix. Try this function:
fact(P) =
{
my(x=variable(P),y=variable(Vec(P)));
my(d=poldegree(P,y)+1);
my(C=content(P),FC=factor(C));
for(i=1,oo,
my(R=substpol(factor(subst(P/C,y,(x+i)^d)),(x+i)^d,y));
R= matconcat([FC,R]~);
my(F=factorback(R));
if(pollead(P)*F==pollead(F)*P,
return(R));
);
}
Cheers,
Bill