ff(p,f) = ffgen(p^f, 'a);
doell(a)= {
  my(e, P);
  e = ellinit([1,1,3,4,5]*a);
  P = random(e); [P, ellisoncurve(e,P)];
}
doff(p,f)=my(a = ff(p,f)); print(random(a)); doell(a);

setrand(2^33 + 3)
random()
setrand(1);
random(Mod(1,3))
doff(2,3)
doff(precprime(2^32), 3)
doff(nextprime(2^64), 3)
default(realprecision,38)
random(1.)
random(x^5*Mod(1,7))
randomprime(2)
randomprime([0,1])
randomprime([2.5,2.4])
randomprime([2.4,2.5])
randomprime()
randomprime(10)
randomprime([2^100, 2^100 + 2^20])
for (i=1,10, a = random([15,20]); if (a < 15 || a > 20, print(a)))
s=getrand();
v=vector(10,i,random());
setrand(s);
w=vector(10,i,random());
if(v != w,error("setrand"));
random("")
setrand(2^65)
setrand(-1)
