fprintf "table1", "\n"; fprintf "table1", "\\begin{table}\n"; fprintf "table1", "\\caption{Timings for $ \\Li n \\pi(\\z-1) $.}\n"; fprintf "table1", "\\label{table1}\n"; fprintf "table1", "\\vskip-.7cm\n"; fprintf "table1", "$$\n"; fprintf "table1", "\\begin{array}{lrrrrrr}\n"; fprintf "table1", "\\hline\n"; fprintf "table1", "\\vphantom{b^{b^b}}\n"; fprintf "table1", "\\vphantom{p_{p_{p_p}}}\n"; fprintf "table1", "q(x) & n & p & e & f & N & \\text{Time}\\cr\n"; fprintf "table1", "\\hline\n"; fprintf "table1", "\\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; print "p:", p, " N:", N, " Ne:", Ne;; // 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 // now for the actual computation... M:=Maximum(0,Floor(Log(n*e/Log(p))/Log(p))); while p^(M+1)/e-(M+1)*n le N do M:=M+1; end while; // We can now create the field up to the required precision. // First the unramified extension, then a totally ramified extension Funrprecision:=N+n*M+1; Fprecision:=e*N+e*n*M+1; Funr:=ext; F:=ext; pp:=UniformizingElement(F); Fz:=PolynomialRing(Funr); Tmgen:=HenselLift(z^(resfsize-1)-1, Funr!PrimitiveElement(ResidueClassField(IntegerRing(Funr))), Funrprecision); testz:=pp*(Tmgen-1); // Now we can define the function Li0:=function(z) answer:=O(pp^Ne); for m in [0..M] do tslm:=Maximum(1,Floor(e*(N+m*n)/p^m)); answer:=answer + &+[ k mod p eq 0 select 0 else z^(k*p^m)/k^n : k in [1..tslm] ]/p^(m*n); end for; return answer; end function; // Now about times... mytime:=Cputime(); A:=Li0(testz); TIME:=Cputime(mytime); print "CPUtime:", TIME; fprintf "table1", "%o & %o & %o & %o & %o & %o & %o \\cr\n", pol, n, p, e, f, N, TIME; end for; print "==================================="; fprintf "table1", "\\hline\n"; fprintf "table1", "\\end{array}\n"; fprintf "table1", "$$\n"; fprintf "table1", "\\end{table}\n"; fprintf "table1", "\n";