Annegret Weng on Tue, 27 Jun 2000 20:31:52 -0400 (EDT)

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

Garbage collection

Dear PARI Lovers,

I have a problem with my stack. Sometimes I get the error:
            the PARI stack overflows !

I think I found the part of my program which is responsible for it but I
do not know what to do. The program itself works and if I do not get the
error I get the right answer. My only problem is the stack. 

I wrote the following function:

GEN summand(GEN matrix, GEN delta, GEN epsilon, GEN ganz_vector, int prec)
  long ltop;
  /*some calculation - I think this is not important to find my problem
  but maybe it helps*/
  GEN zwischen1,zwischen2;
  GEN vector1=gadd(delta,ganz_vector);
  return gerepileupto(ltop,gexp(zwischen1,prec));

Then I have a command 

(*)  ltop=avma;

I have initialized "summe" before.
Now I put 

   cout << avma << endl;

before and after the lines (*) and I can see that the value of avma has
increased. Why?  I haven't created any new variable. If I do not have the
gerepileupto-command in (*) it is worse.

The value of avma increases between 20 and 60. This is not very much but I
am running through a loop and it sums up. So at the end I get the error
stated above.

Thank you very much for every help!

Best regards,
Annegret Weng