I'm new to pari gp, and just trying out, playing with it. i have an inverse function that goes like this.
inverse (a,n) =
{
negative = false;
if (a < 0, negative = true);
if (a < 0, a= a*-1);
i = n;
v = 0;
d = 1;
while (a>0,t=i/a; x =a;
a = i % x;
i = x;
x = d;
d = v - t*x;
v = x);
v %= n;
if (v < 0, v = (v+n)%n);
if (negative == true, return (-v));
return (v);
};
so i have sort of a main function, which consist of something like this.
while (i<n,i++;
while(j<n,j++;
// some other codes
temp1 = inverse(temp,modulus)));
I got an error that says incorrect type in &[] 0Ccompo1ptr [not a vector] (t_INT) i am quite sure that the rest of the code is work fine, since the error only occurred when i place
temp1 = inverse (temp,modulus)
in.