Changeset 8d679fd in git
- Timestamp:
- Dec 3, 2009, 3:56:44 PM (14 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 7a4a438c344423ba7293bff2ab899900189f2830
- Parents:
- 725ef18d92b06980ce6d68815819fcbf02497748
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kstd2.cc
r725ef18 r8d679fd 12 12 13 13 // define to enable tailRings 14 #define HAVE_TAIL_RING14 //#define HAVE_TAIL_RING 15 15 16 16 #include "mod2.h" … … 22 22 #endif /* ifndef NDEBUG */ 23 23 24 #if MYTEST 24 #if MYTEST 25 25 # ifdef HAVE_TAIL_RING 26 26 # undef HAVE_TAIL_RING … … 301 301 int redRing (LObject* h,kStrategy strat) 302 302 { 303 if (h-> p == NULL && h->t_p == NULL) return 0; // spoly is zero (can only occure with zero divisors)304 305 // if (strat->tl<0) return 1; 303 if (h->IsNull()) return 0; // spoly is zero (can only occure with zero divisors) 304 if (strat->tl<0) return 1; 305 306 306 int at,i; 307 307 long d; … … 318 318 loop 319 319 { 320 j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h); 321 if (j < 0) return 1; 322 #ifdef KDEBUG 323 if (TEST_OPT_DEBUG) 324 { 325 PrintS("T red:"); 326 } 327 #endif 320 j = kFindDivisibleByInT(strat->T, strat->sevT, strat->tl, h); 321 if (j < 0) return 1; 328 322 #ifdef KDEBUG 329 323 if (TEST_OPT_DEBUG) 330 324 { 325 PrintS("T red:"); 331 326 h->wrp(); 332 327 PrintS(" with "); … … 352 347 h->lcm=NULL; 353 348 #endif 349 h->Clear(); 354 350 return 0; 355 351 } … … 362 358 { 363 359 h->SetLmCurrRing(); 360 if (strat->posInLDependsOnLength) 361 h->SetLength(strat->length_pLength); 364 362 at = strat->posInL(strat->L,strat->Ll,h,strat); 365 363 if (at <= strat->Ll) … … 373 371 } 374 372 } 375 elseif (d != reddeg)373 if (d != reddeg) 376 374 { 377 375 if (d >= strat->tailRing->bitmask) 378 376 { 379 380 381 377 if (h->pTotalDeg() >= strat->tailRing->bitmask) 378 { 379 strat->overflow=TRUE; 382 380 //Print("OVERFLOW in redRing d=%ld, max=%ld\n",d,strat->tailRing->bitmask); 383 384 385 386 381 h->GetP(); 382 at = strat->posInL(strat->L,strat->Ll,h,strat); 383 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 384 h->Clear(); 387 385 return -1; 388 386 } … … 653 651 if (d>=strat->tailRing->bitmask) 654 652 { 655 656 657 653 if (h->pTotalDeg() >= strat->tailRing->bitmask) 654 { 655 strat->overflow=TRUE; 658 656 //Print("OVERFLOW in redLazy d=%ld, max=%ld\n",d,strat->tailRing->bitmask); 659 660 661 662 657 h->GetP(); 658 at = strat->posInL(strat->L,strat->Ll,h,strat); 659 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 660 h->Clear(); 663 661 return -1; 664 662 } … … 831 829 if (d>=strat->tailRing->bitmask) 832 830 { 833 834 835 831 if (h->pTotalDeg()+h->ecart >= strat->tailRing->bitmask) 832 { 833 strat->overflow=TRUE; 836 834 //Print("OVERFLOW in redHoney d=%ld, max=%ld\n",d,strat->tailRing->bitmask); 837 838 839 840 835 h->GetP(); 836 at = strat->posInL(strat->L,strat->Ll,h,strat); 837 enterL(&strat->L,&strat->Ll,&strat->Lmax,*h,at); 838 h->Clear(); 841 839 return -1; 842 840 } … … 1003 1001 #if MYTEST 1004 1002 if (TEST_OPT_DEBUG) 1005 { 1003 { 1006 1004 PrintS("bba start GB: currRing: "); 1007 1005 // rWrite(currRing);PrintLn(); … … 1030 1028 1031 1029 1030 #ifdef KDEBUG 1031 //kDebugPrint(strat); 1032 #endif 1032 1033 /* compute------------------------------------------------------- */ 1033 1034 while (strat->Ll >= 0) … … 1082 1083 if (!kStratChangeTailRing(strat)) 1083 1084 { 1084 WerrorS("OVERFLOW..."); 1085 WerrorS("OVERFLOW..."); 1085 1086 break; 1086 1087 }
Note: See TracChangeset
for help on using the changeset viewer.