{ \\ PARI/GP-Script "LlorenteQuerOpt93.gp" \\ 1st step of the principalization algorithm: \\ generating polynomials for triply real cubic fields allocatemem(512000000); fn="LlorenteQuerPol93.csv"; \\ given bounds for the field discriminant lb=0; ub=10000000; \\ two nested loops for the coefficients: \\ bounds for the coefficients by Llorente and Quer uc=truncate(sqrt(ub)); for(c=1,uc, ud=truncate(sqrt((4.0*c^3)/27.0)); for(d=1,ud, \\ tracefree generating polynomial p3=x^3-c*x-d; if(polisirreducible(p3), d3=nfdisc(p3); sc=truncate(sqrt(d3)); if(0==d3%27, sc=truncate(sqrt(d3)/3.0); );\\ end if if(c<=sc, ui=truncate(2.0*sqrt(c)); if(0==d3%27, ui=truncate(2.0*sqrt(c/3.0)); );\\ end if dp=poldisc(p3); ip=truncate(sqrt(dp/d3)); \\ exclusion of huge indices if(ip1, if((0==q[2][2]%3)&&!(0==q[2][1]%27), print1("d3=" d3); print1(" c=" c); print1(" d=" d); print(" ip=" ip); write1(fn,d3); write1(fn,";"); write1(fn,c); write1(fn,";"); write(fn,d); );\\ end if );\\ end if );\\ end if );\\ end if );\\ end if );\\ end if );\\ end if );\\ end for );\\ end for }