Changeset 07b6ac in git
- Timestamp:
- Feb 6, 2008, 1:51:41 PM (15 years ago)
- Branches:
- (u'spielwiese', '828514cf6e480e4bafc26df99217bf2a1ed1ef45')
- Children:
- 9b107f9206df58706364a2dae65b07124f9aa017
- Parents:
- 8f2bd1fc11ce18b5be7a734f75309011e212a4d3
- Location:
- kernel
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/p_Mult_mm__T.cc
r8f2bd1f r07b6ac 7 7 * Author: obachman (Olaf Bachmann) 8 8 * Created: 8/00 9 * Version: $Id: p_Mult_mm__T.cc,v 1. 6 2007-05-10 08:12:42wienand Exp $9 * Version: $Id: p_Mult_mm__T.cc,v 1.7 2008-02-06 12:51:41 wienand Exp $ 10 10 *******************************************************************/ 11 11 … … 19 19 LINKAGE poly p_Mult_mm(poly p, const poly m, const ring ri) 20 20 { 21 poly before = p;22 21 p_Test(p, ri); 23 22 p_LmTest(m, ri); … … 31 30 pAssume(!n_IsZero(ln,ri)); 32 31 32 #ifdef HAVE_ZERODIVISORS 33 poly before = p; 34 #endif 33 35 while (p != NULL) 34 36 { … … 38 40 if (n_IsZero(tmp, ri)) 39 41 { 42 n_Delete(&tmp, ri); 40 43 if (before == p) 41 44 { 42 p = p Next(p);45 p = p_LmDeleteAndNext(p, ri); 43 46 before = p; 44 47 q = p; … … 46 49 else 47 50 { 48 pNext(before) = pNext(p); 49 p_LmFree(p, ri); 50 p = pNext(before); 51 p = p_LmDeleteAndNext(p, ri); 52 pNext(before) = p; 51 53 } 52 54 } -
kernel/rmodulon.cc
r8f2bd1f r07b6ac 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: rmodulon.cc,v 1.1 7 2008-02-06 09:12:47wienand Exp $ */4 /* $Id: rmodulon.cc,v 1.18 2008-02-06 12:51:41 wienand Exp $ */ 5 5 /* 6 6 * ABSTRACT: numbers modulo n … … 346 346 nrnBase = r->ringflaga; 347 347 nrnExponent = r->ringflagb; 348 if (nrnModul != NULL)349 { 350 nrn Delete((number*) &nrnModul, NULL);351 nrnDelete((number*) &nrnMinusOne, NULL);352 }353 nrnModul = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin354 mpz_init(nrnModul);348 if (nrnModul == NULL) 349 { 350 nrnModul = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin 351 mpz_init(nrnModul); 352 nrnMinusOne = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin 353 mpz_init(nrnMinusOne); 354 } 355 355 mpz_set_ull(nrnModul, nrnBase); 356 356 mpz_pow_ui(nrnModul, nrnModul, nrnExponent); 357 358 nrnMinusOne = (int_number) omAllocBin(gmp_nrn_bin); // evtl. spaeter mit bin359 mpz_init(nrnMinusOne);360 357 mpz_sub_ui(nrnMinusOne, nrnModul, 1); 361 358 } … … 366 363 if (mpz_cmp_ui(nrnModul,2) <= 0) 367 364 { 368 WarnS("nInit Charfailed");365 WarnS("nInitExp failed"); 369 366 } 370 367 }
Note: See TracChangeset
for help on using the changeset viewer.