Vincent Torri on Wed, 08 Jun 2005 12:54:16 +0200

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

dumb question about rationals


i've just started to use PARI (that is, the library), and I want to use
the rational objects. But I have some problems.
My program is quite simple :

   GEN r1;
   GEN r2;

   pari_init (1000000, 2);

   r1 = cgetg (3, t_FRAC);
   r2 = cgetg (3, t_FRAC);

   r1[1] = (long)2;
   r1[2] = (long)2;

   r2[1] = (long)2;
   r2[2] = (long)2;

   r2 = gadd (r2, r1);

but, when i launch the program, i get:

   ***   segmentation fault: bug in PARI or calling program.
   ***   Error in the PARI system. End of program.

Could you please tell me why there is this problem, and where my error(s)
is (are)

Thank you very much

Vincent Torri