Guys, Thank you for the quick reply. I will answer to both questions:
> Are you using ntl_ZZ_p or ntl_ZZ_pE? I have experienced the same type > of errors with the latter (due to bad manipulations of > ntl_ZZ_pEContext by myself. Yes, I experience problems while using ZZ_pE as in this case NTL does block allocation, and cannot re-allocate a single ZZ_p. On Mar 24, 11:08 am, Mike Hansen <[email protected]> wrote: > Are you able to post the code that causes this problem? That would > help a lot with trying to figure out what's going on. > > --Mike Mike, unfortunately, the code is too complicated to be presented here, but I will try my best to explain what kind of the problem I am facing. Basically, the problem occurs once an ZZ_pX was created with a certain modulus N, and then assigned from another ZZ_pX created with a bigger modulus N' > N. Semantically, consider the following algorhtm: ZZ_pE a, ap; // Initialize ap while (precision < max_precision) { a = f(ap); // * ap = a; // ** precision++; } where calculations in f() are done with modulus 2^precision. IMHO, both statements (*) and (**) may lead to an error, as they should be overwritten with bigger array. This is essentially a problem stated in the aforementioned SAGE doc page on p-adic element. So, I wonder, do you know any good ways to overcome this? In particular, is there a way to explicitly re-allocate a previously allocated ZZ_pX object? Another question: does NTL perform an automatic garbage collection in any way? Regards and thanks for your help, B/ -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org To unsubscribe from this group, send email to sage-support+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
