mathewes on Fri, 14 Sep 2012 17:43:34 +0200


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

pari error-handing problem


Dear Sir or Madam,
I am a new user for PARI.  Recently  I got some problems with the error-handing when I use the pari lib. 
In my GP script code;

trap(,flag=1,1/(d[2]-d[1])*Mod(1,n));

And I use gp2c convert it to C code. 
It looks like that:

GEN anon_1(GEN d, GEN n)
{
  return gmul(ginv(gsub(gel(d, 2), gel(d, 1))), gmodulsg(1, n));
}

GEN anon_0(GEN flag)
{
  return flag = gen_1;
}

  trap0("", strtoclosure("anon_0", 1, flag), strtoclosure("anon_1", 2, d, n));

After that I add some other parts for the project. 
I get a success when I run the 'make', but when I use  ./Filename-dyn, I got a error:
 ***   no function named "anon_1".
  ***   Error in the PARI system. End of program.

I got confused about that. Can you help me?

PS: I am not a native speaker for English, so the mail must have some error. 
PS: Maybe I had got it  that the main use file after 'Make' is to use as a lib, but I wonder if there is some way to use it in native Anscii C + general PARI lib.

Yours,
Tian