\\package:elldata
/*
GP; init_programming()
*/
foo()=1;
global(GRAPH=0,W);
plot(x=0,10,sin(Pi*cos(x)))
if(GRAPH,print("ploth: ",ploth(x=0,20,besselj(1,x))));
plothexport("svg",x=0,20,[sin(2*x),cos(3*x)],1);
plotinit(1);
print("plotrecth: ",plotrecth(1,x=0,20,[sin(Pi*cos(2*x)),cos(3*x)],1))
plotexport("svg",1);
if(GRAPH,print("psploth: ",psploth(x=0,20,[sin(cos(2*x)),cos(3*x)],1)))
print("alarm: ",alarm(2^29,factor(91)))
print1("forqfvec:");forqfvec(v,matid(4),,print1(" ",v));print();
print("matrix: ",matrix(2,3,i,j,[i,j]));
print("vector: ",vector(3,i,i+1));
print("vectorsmall: ",vectorsmall(3,i,i+3));
print("vectorv: ",vectorv(3,i,i+2));
print("direuler: ",direuler(p=3,10,1/(1-kronecker(-4,p)*'X)));
print1("for:"); for(i=1,3,print1(" ",i)); print();
print1("forcomposite:"); forcomposite(c=1,10,print1(" ",c)); print();
print1("fordiv:"); fordiv(30,d,print1(" ",d)); print();
print1("fordivfactored:"); fordivfactored(30,d,print1(" ",d)); print();
print1("foreach:"); foreach(primes([1,10]),v,print1(" ",v)); print();
print1("forell:"); forell(E,1,100,print1(" ",E[1]),1); print();
print("forfactored: unsupported");
print1("forpart:");forpart(p=5,print1(" ",p));print();
print1("forpart:");forpart(p=5,print1(" ",p),,3);print();
print1("forprime:"); forprime(p=2,10,print1(" ",p)); print();
print1("forprimestep:"); forprimestep(p=2,20,Mod(1,3),print1(" ",p)); print();
print("forsquarefree: unsupported");
print1("forstep:"); forstep(i=1,21,3,print1(" ",i)); print();
print1("forstep(vec):"); forstep(i=1,21,[2,4],print1(" ",i)); print();
print1("forsubgroup:"); forsubgroup(G=[5,5],,print1(" ",matsnf(G))); print();
print1("forsubset:");forsubset(5,p,print1(" ",p));print();
print1("forvec:"); forvec(v=[[1,3],[1,2]],print1(" ",v)); print();
print("iferr: ",iferr(zeta(1),E,E))
print1("parfor: ");W=vector(10);parfor(i=1,10,binomial(2*i,i),E,W[i]=E);print(W)
print1("parforeach: ");W=vector(20);parforeach(primes([1,20]),i,binomial(2*i,i),E,W[i]=E);print(W);
print1("parforprime: ");W=vector(20);parforprime(i=1,20,binomial(2*i,i),E,W[i]=E);print(W);
print1("parforprimestep: ");W=vector(20);parforprimestep(i=1,20,Mod(1,3),binomial(2*i,i),E,W[i]=E);print(W);
print1("parforstep: ");W=vector(100);parforstep(i=1,100,3,binomial(2*i,i),E,W[i]=E);print(W);
print1("parforstep: ");W=vector(100);parforstep(i=1,100,Mod(1,3),binomial(2*i,i),E,W[i]=E);print(W);
print1("parforstep: ");W=vector(100);parforstep(i=1,100,[4,-1],binomial(2*i,i),E,W[i]=E);print(W);
print1("parforvec: ");W=vector(9);parforvec(v=[[0,2],[0,2]],fromdigits(v,3),E,W[E+1]=v);print(W);
print1("parforvec: ");W=vector(9);parforvec(v=[[0,2],[0,2]],fromdigits(v,3),E,W[E+1]=v,1);print(W);
print1("parforvec: ");W=vector(9);parforvec(v=[[0,2],[0,2]],fromdigits(v,3),E,W[E+1]=v,2);print(W);
print("parmatrix: ",parmatrix(3,3,i,j,10*i+j));
if(GRAPH,print("parploth:",parploth(x=1,2,1/gamma(x))));
if(GRAPH,print("parploth:",parploth(x=0,2*Pi,[cos(2*x),sin(3*x)],1)));
parplothexport("svg",x=1,2,1/gamma(x));
parplothexport("svg",x=0,2*Pi,[cos(2*x),sin(3*x)],1);
print("parsum:",parsum(i=1,3,i));
print("parvector: ",parvector(3,i,i+1));
print("derivnum: ",derivnum(x=3,1/(1+x^2)));
print("intcirc: ",intcirc(x=0,2,zeta(x)));
print1("intfuncinit: "); my(A=intfuncinit(x=[-oo,1],[+oo,1],exp(-x^2))); \
print(intnum(x=[-oo,1],[+oo,1],exp(-x),A));
print("intnum: ",intnum(x=0,1,1/(1+x^2)));
print("intnumgauss: ",intnumgauss(x=0,1,1/(1+x^2)));
print("intnumromb: ",intnumromb(x=0,1,1/(1+x^2)));
print("prod: ",prod(i=1,10,i));
print("prodeuler: ",prodeuler(p=2,10,p));
print("prodinf: ",prodinf(n=1,1-2^-n));
print("solve: ",solve(x=1.6,4.6,tan(x)-x))
print("solvestep ",solvestep(X=0,10,1,sin(X^2)));
print("solvestep ",solvestep(X=0,10,1,sin(X^2)),1);
print("sum: ",sum(i=1,10,i));
print("sumalt: ",sumalt(n=1,(-1)^(n+1)*n^-2));
print("sumdiv: ",sumdiv(30,d,d));
print("sumdivmult: ",sumdivmult(30,d,eulerphi(d)));
print("suminf: ",suminf(n=1,2^-n*moebius(n)))
print("sumnum : ",sumnum(n=1,n^-2))
print("sumnumap : ",sumnumap(n=1,n^-2))
print("sumnumlagrange : ",sumnumlagrange(n=1,n^-2))
print("sumnummonien : ",sumnummonien(n=1,n^-2))
print("sumpos : ",sumpos(n=1,n^-2))
print("compr: ",[x^2+1|x<-primes(10)]);
print("compr: ",[x^2+1|x<-[1..10], isprime(x)]);
