Try GP in your browser 
Main Download  Packages  Funding  SEARCH Help / Community FAQ  Documentation  Tutorials  Mailing Lists  Bugs  Timeline  Ateliers PARI/GP  Library Publications  Contributed GP scripts  Links  Fun!  Development Latest Changes  Version Control  Coding Guidelines  PariDroid  Logo  Tests & benchmarks Buildlogs  Coverage Report  Doc Coverage  Refcards test  Benchmarks  WWW Stats   
Run PARI/GP in your browser
Stable Version  | Development version
 
Type a GP expression in the blue box then hit
<Shift>-<Enter> or click on the
Evaluate button below it. A trailing semi-colon ;
prevents output, but not warnings or diagnostics.
You can assign to variables and define user functions. Speed is approximately
15% of native speed.
New Cell 
Examples (click a statement below to paste it) 
?eulerphi
 (short help),
??factor
 (long help in
new tab)
 
2*3
,
10!
,
(1+x)^10
,
exp(Pi*sqrt(163))
   
factor(2^128+1)
,
factor(x^4+4)
,
isprime(10^50+151)
   
ploth(x=1,100,[sqrt(2/(Pi*x)),besselj(0,x),-sqrt(2/(Pi*x))])
   
ploth(x=0,2*Pi,[sin(2*x),cos(3*x)],1)
   
 ploth(x=0,20,zeta(1/2+I*x),"Complex") 
 
intnum(x=-oo,oo,1/(1+x^2))
,
sumpos(n=1, n^(-3))
   
sin(x)
,
ellj(x + O(x^20))
   
Mod(x,x^2-x-1)^100000==fibonacci(100000)*x+fibonacci(99999)
   
g=gamma(1/4+O(5^20))
,
 algdep(g,4)
,
g^4+4*g^2+5
   
\p100
: change default accuracy to 100 decimal digits
   
K=bnfinit(a^2+23);
 (huge: don't forget the
;
),
K.clgp
,
bnrclassfield(K)
   
E=ellinit([1,3]*Mod(1,10^50+151)); ellcard(E)
   
E=ellinit([-157^2,0]); P=ellheegner(E)
,
ellisoncurve(E,P)
   
polgalois(x^8-2)
,
ellsearch(11)
 (loads packages
on demand) 
lfun(x^3-2, 2)
 (Dedekind zeta function) 
z=exp(lfun(4*67,1)*sqrt(67));[(z+1/z)/2,(z-1/z)/2/sqrt(67)]
 
E=ellinit("11a1");L=lfuninit(E,[0,100]);ploth(x=0,100,lfunhardy(L,x))
 
 
ecm(N, B = 1000!, nb = 100)=
{
  for(a = 1, nb,
    iferr(ellmul(ellinit([a,1], N), [0,1], B),
      E, return(gcd(lift(component(E,2)),N))))
}
ecm(2^101-1)
 
 
 
K=matkerint(Mat(concat([vector(23,i,2*i+1),51,145])));
M=matdiagonal(vector(25,i,if(i==25,-1,1)));
 
L24 = K~*M*K
 (Leech Lattice),
qfminim(L24)[1]
,
qfauto(L24)[1]
 
 
PARI is compiled using emscripten .
Enter \v for version information.