Changeset 488056 in git
 Timestamp:
 Dec 17, 2012, 1:10:48 PM (10 years ago)
 Branches:
 (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
 Children:
 a453bfa3c5e9178b6ada6c3e4b3500f7b3e65b6f
 Parents:
 8c6bd4d4de4c46d6d974085a44f6e1530d956d5a
 Location:
 libpolys/coeffs
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

libpolys/coeffs/rmodulo2m.cc
r8c6bd4d r488056 51 51 r>nCoeffIsEqual = nr2mCoeffIsEqual; 52 52 53 r>modBase = (int_number) omAlloc (sizeof(mpz_t));53 r>modBase = (int_number) omAllocBin (gmp_nrz_bin); 54 54 mpz_init_set_si (r>modBase, 2L); 55 55 r>ringtype = 1; 56 r>modNumber= (int_number) omAllocBin (gmp_nrz_bin); 57 mpz_init (r>modNumber); 58 mpz_pow_ui (r>modNumber, r>modBase, r>modExponent); 56 59 57 60 /* next cast may yield an overflow as mod2mMask is an unsigned long */ 
libpolys/coeffs/rmodulon.cc
r8c6bd4d r488056 51 51 assume( (getCoeffType(r) == ID)  (getCoeffType (r) == ID2) ); 52 52 ZnmInfo * info= (ZnmInfo *) p; 53 r>modBase = (int_number) omAlloc (sizeof(mpz_t));53 r>modBase = (int_number) omAllocBin (gmp_nrz_bin); 54 54 mpz_init_set (r>modBase, info>base); 55 55 … … 578 578 { 579 579 /* clean up former stuff */ 580 //if (r>modBase != NULL) mpz_clear(r>modBase);581 580 if (r>modNumber != NULL) mpz_clear(r>modNumber); 582 581 583 582 r>modExponent= m; 584 /* this is Z/m = Z/(m^1), hence set modBase = m, modExponent = 1: */585 //r>modBase = (int_number)omAllocBin(gmp_nrz_bin);586 //mpz_init(r>modBase);587 //mpz_set_ui(r>modBase, (unsigned long)m);588 583 r>modNumber = (int_number)omAllocBin(gmp_nrz_bin); 589 584 mpz_init_set (r>modNumber, r>modBase);
Note: See TracChangeset
for help on using the changeset viewer.