Ahmad Kamal on Wed, 11 Jul 2012 11:34:20 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Hello


Hi , i want to ask please about the command      x=random(p)    :

what if i want to be sure that x has an inverse Mod p .

cause in the following program it always give an error :


n=5;
p=281040463189842761944876463095882573657425678131112457182259869008082819;
X=listcreate(n);
for(x=1,n,listput(X,random(p),x)) ;

invX=listcreate(n);
for(x=1,n,listput(invX,lift(Mod(X[x],p)^-1),x)) ;