n = fileopen("myfile","w"); for(i=1,10,filewrite(n,2^i)); fileclose(n) n = fileopen("myfile"); while (l = filereadstr(n), print(l)) fileclose(n) n = fileopen("myfile"); while (l = fileread(n), print(l)) fileclose(n) n = fileextern("ls /"); while (l = filereadstr(n), print(l)) fileclose(n) forprimestep(p = 2, 50, Mod(1,5), print(p)) forstep(p = 2, 20, Mod(1,5), print(p)) forsquarefree(N=1,10,print(N)) my(s=0.);forsquarefree(N=1,10^6, \ s+=moebius(N)/N[1]^2);s ## my(s=0.);forfactored(N=1,10^6, \ s+=moebius(N)/N[1]^2);s ## factor(x^4+1) factor(x^4+1,I) factor(x^4+1,Mod(1,3)) factor(x^4+1,ffgen(9,'a)) factor(x^4+1,Mod(a,a^2-2)) a=ffgen(3^2,'a); factormod((x^4+1)*Mod(1,3)) factormod(x^4+1,3) factormod((x^4+1)*a^0) factormod(x^4+1,a) polrootsmod(x^4+1,a) polrootsmod((x^4+1)*a^0) factormodSQF(x*(x+1)*(x^2+1)^2,3) factormodDDF((x^4+1)*(x^2+a)) write("sin.svg",plothexport("svg",x=0,1,sin(x))) plotinit(1);plotmove(1,10,10);plotrbox(1,20,20); plotexport("ps",1) { plotinit(1); plotcolor(1,"#003399"); plotbox(1,600,400,1); plotcolor(1,"#ffcc00"); for(j=0,11, plotmove(1,300+130*cos(2*Pi*j/12), 200-130*sin(2*Pi*j/12)); for(i=0,4, plotrline(1,cos(2*Pi*3*i/5)*40, -sin(2*Pi*3*i/5)*40))); plotdraw([1,0,0]); } strsplit("a,b,c,d",",") strjoin(["a","b","c"],":") N = galoisgetgroup(12); \\ # of abstract groups for(i=1, N, print(i,":",galoisgetname(12,i))) G=galoisgetgroup(12,3); [T,o]=galoischartable(G); T~ qfbsolve(Qfb(1,0,1),65) qfbsolve(Qfb(1,1,-1),-1) hypergeom([],[],2) f(z)=hypergeom([1,2],[3],z); lindep([f(1/2),f'(1/2),f''(1/2)]) airy(2) airy''(2)/2 E=ellinit([0,-1,1,-10,-20]); L=lfunsympow(E,2); lfun(L,2) -(2*Pi*E.omega[1]*imag(E.omega[2]))/11 T = ffinit(3, 3, 't) P = polteichmuller(T,3,5) subst(P, t, t^3) % (P*Mod(1,3^5)) mfl=mfinit([124,1,0],1); apply(mfgaloistype,mfl) mf=mfl[2]; F=mfeigenbasis(mf)[1]; P=mfgaloisprojrep(mf,F) G=galoisinit(P); T=galoisfixedfield(G,G.gen[3],1) E=ellinit([1, 0, 1, 1, 2]); [L,M]=ellisotree(E); M K = nfinit(x^3 - 2); A = [46875, 30966, 9573; 0, 3, 0; 0, 0, 3]; idealispower(K, A, 3, &B) B T = x^6+108; nf = nfinit(T); a = Mod(x,T); setrand(1); u = (2*a^2+a+3)*random(2^1000*x^6)^2; b = idealredmodpower(nf,u,2); v2 = nfeltmul(nf,u, nfeltpow(nf,b,2)) dirpowers(10,3) pollaguerre(5) log1p(1) log1p(10.^-30) log(1.+10.^-30) serchop(1/x+x+3*x^2+O(x^3),0) serchop(1/x+x+3*x^2+O(x^3),2) localprec(100);getlocalprec() localbitprec(1000);getlocalbitprec()