| Roland Dreier on Fri, 9 Oct 1998 08:16:02 -0500 (CDT) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Fix to my fix |
My previous fix for the factorization bug had a problem: the power of p we
have to raise things to when taking their pth root might be too big to fit
in a long. So I should have made frobinv a GEN:
*** src/basemath/polarit1.c.orig Thu Jul 23 08:40:23 1998
--- src/basemath/polarit1.c Thu Oct 8 15:01:24 1998
***************
*** 1595,1598 ****
--- 1595,1599 ----
GEN ex,y,f2,f3,df1,df2,g,g1,xmod,u,v,pd,q,qq,unfp,unfq;
GEN *t;
+ GEN frobinv = gpowgs(pp,lgef(a)-4);
if (typ(a)!=t_POL || typ(f)!=t_POL || gcmp0(a)) err(factmoder);
***************
*** 1616,1620 ****
j=(lgef(f)-3)/p+3; f2=cgetg(j,t_POL);
f2[1] = evalsigne(1) | evallgef(j) | evalvarn(vf);
! for (i=2; i<j; i++) f2[i]=f[p*(i-2)+2];
f=f2; df1=deriv(f,vf); f3=NULL;
}
--- 1617,1621 ----
j=(lgef(f)-3)/p+3; f2=cgetg(j,t_POL);
f2[1] = evalsigne(1) | evallgef(j) | evalvarn(vf);
! for (i=2; i<j; i++) f2[i]=(GEN) gpow((GEN) f[p*(i-2)+2],frobinv,0);
f=f2; df1=deriv(f,vf); f3=NULL;
}
Roland