fprintf "table3", "\n"; fprintf "table3", "\\begin{table}\n"; fprintf "table3", "\\caption{Timings for $ \\Li n {\\z+(\\z-1)\\pi} $.}\n"; fprintf "table3", "\\label{table3}\n"; fprintf "table3", "\\vskip-.7cm\n"; fprintf "table3", "$$\n"; fprintf "table3", "\\begin{array}{lrrrrrrrr}\n"; fprintf "table3", "\\hline\n"; fprintf "table3", "\\vphantom{b^{b^b}}\n"; fprintf "table3", "\\vphantom{p_{p_{p_p}}}\n"; fprintf "table3", "q(x) & n & p & e & f & N & \\text{Time 1} & \\text{Time 2} & \\text{Time 3}\\cr\n"; fprintf "table3", "\\hline\n"; fprintf "table3", "\\vphantom{b^{b^b}}\n"; load "lippapertablesdata"; for example in gothrough do print "==================================="; p:=example[1]; N:=example[2]; n:=example[3]; f:=example[4]; pol:=example[5]; resfsize:=p^f; e:=Degree(pol); Ne:=e*N+1; // add 1 since we define precision using >, not >= // So the role of N in the paper is played by Ne since Magma does renormalize the valuation on F print "p:", p, " N:", N, " Ne:", Ne; // A basic function: mink:=function(c1,c2,c3) // This function returns, if c1,c2>0, the smallest integer k ge 2 such that c1*m-c2*Log(m)>c3 for all m ge k. k1:=Maximum(1,Floor(c2/c1));k2:=Ceiling(c2/c1); if Minimum(c1*k1-c2*Log(k1), c1*k2-c2*Log(k2)) gt c3 then return 2; else while c1*k1-c2*Log(k1) le c3 do; k1:=k1+Ceiling((c2*Log(k1)-c1*k1+c3)/c1); end while; return k1; end if; end function; mytime:=Cputime(); tsl:=mink(1/e,n/Log(p),N); gsl:=1; for m in [1..n] do gsl:=Maximum(gsl,mink(1/(p-1), 1/Log(p), N-m+(n-m)*Log(tsl-1)/Log(p)+p/(p-1)-(n-1)/Log(p)+(n-1)*Log(n*(p-1)/Log(p))/Log(p)+Log(2*p*(p-1)*n/Log(p))/Log(p))); end for; print "gsl:", gsl; print "tsl:", tsl; Qpprecision:=N+Floor(n*Log(tsl-1)/Log(p))+n*Floor(Log(gsl-1)/Log(p))+1; print "Qpprecision:", Qpprecision; Qp:=pAdicField(p,Qpprecision); Qpv:=PowerSeriesRing(Qp,gsl); gns:=Vector(Qpv, n,[i gt 1 select Integral(-Self(i-1)*&+[v^j: j in [0..gsl-1]]/v) else Integral(-(v-1-(v-1)^p/(v^p-(v-1)^p))*&+[v^j: j in [0..gsl-1]]/v) : i in [1..n]]); TIME1:=Cputime(mytime); print "CPUtime1:", TIME1; Funr:=ext; Funrprecision:=N+Floor(n*Log(tsl-1)/Log(p))+1; Funrz:=PolynomialRing(Funr); mytime:=Cputime(); print "Constructed Funr"; print "Funrprecision:", Funrprecision; Tmgen:=HenselLift(z^(resfsize-1)-1, Funr!PrimitiveElement(ResidueClassField(IntegerRing(Funr))), Funrprecision); print "Computed Tmgen"; LipTmgen:=Matrix(Funr,n,f,[Evaluate(gns[i],1/(1-Tmgen^(p^(j-1)))) + O(Qp!p^Funrprecision) : j in [1..f], i in [1..n] ]); print "Computed LipTmgen"; LiTmgen:=Vector(Funr,n,[ &+[LipTmgen[i,j]*p^(i*(f+1-j)) : j in [1..f]]/(p^(i*f)-1) : i in [1..n]]); print "Computed LiTmgen"; Funrt:=PowerSeriesRing(Funr,tsl); Fnzetas:=Vector(Funrt,n,[i gt 1 select LiTmgen[i]+Integral(Self(i-1)/(Tmgen+t)) else LiTmgen[1]+Integral(1/(1-Tmgen-t)) : i in [1..n]]); TIME2:=Cputime(mytime); print "CPUtime2:", TIME2; F:=ext; pp:=UniformizingElement(F); print "pp is a root of pol:", Evaluate(pol,pp); print "Ne:", Ne; Fprecision:=e*Funrprecision+1; print "Fprecision:", Fprecision; testz:=Tmgen+pp*(Tmgen-1)+O(pp^Fprecision); mytime:=Cputime(); A:=Evaluate(Fnzetas[n],testz-Tmgen)+O(pp^Ne); TIME3:=Cputime(mytime); print "CPUtime3:", TIME3; fprintf "table3", "%o & %o & %o & %o & %o & %o & %o & %o & %o \\cr\n", pol, n, p, e, f, N, TIME1, TIME2, TIME3; end for; print "==================================="; fprintf "table3", "\\hline\n"; fprintf "table3", "\\end{array}\n"; fprintf "table3", "$$\n"; fprintf "table3", "\\end{table}\n"; fprintf "table3", "\n";