Changeset b3594cb in git
- Timestamp:
- Nov 28, 2022, 4:48:26 PM (17 months ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 8b6880871eb7f0dea5b3bbc2efc8c11035bf5d3ba1848a8b477dcf2db252b506e9fd7ceba77fd054
- Parents:
- 584b82fab1aca9df1e4e790a4ca42e6c4c2ff11a
- Location:
- kernel/GBEngine
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/GBEngine/kChinese.cc
r584b82 rb3594cb 375 375 } 376 376 377 #if 0 378 // debug for send_poly 377 379 void test_n(poly n) 378 380 { … … 395 397 } 396 398 #endif 399 #endif -
kernel/GBEngine/kspoly.cc
r584b82 rb3594cb 42 42 * 43 43 ***************************************************************/ 44 #ifdef STDZ_EXCHANGE_DURING_REDUCTION 44 45 int ksReducePolyZ(LObject* PR, 45 46 TObject* PW, … … 184 185 return ret; 185 186 } 187 #endif 186 188 187 189 int ksReducePoly(LObject* PR, … … 342 344 343 345 #ifdef HAVE_RINGS 346 #ifdef STDZ_EXCHANGE_DURING_REDUCTION 344 347 int ksReducePolyGCD(LObject* PR, 345 348 TObject* PW, … … 466 469 return ret; 467 470 } 471 #endif 468 472 #endif 469 473 -
kernel/GBEngine/kstd2.cc
r584b82 rb3594cb 84 84 LObject* L,const kStrategy strat); 85 85 86 #ifdef STDZ_EXCHANGE_DURING_REDUCTION 86 87 int kFindSameLMInT_Z(const kStrategy strat, const LObject* L, const int start) 87 88 { … … 139 140 } 140 141 } 142 #endif 143 141 144 // return -1 if T[0] (w/o coeff) does not divide the leading monomial 142 145 // (only for euclidean rings (n_QuotRem) … … 488 491 int ende=strat->sl; 489 492 #endif 490 if(rField_is_Ring(currRing))491 {492 loop493 {494 if (j > ende) return -1;495 #if defined(PDEBUG) || defined(PDIV_DEBUG)496 if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j],497 p, not_sev, currRing))498 #else499 if ( !(strat->sevS[j] & not_sev) &&500 p_LmDivisibleBy(strat->S[j], p, currRing))501 #endif502 {503 if(n_DivBy(pGetCoeff(p), pGetCoeff(strat->S[j]), currRing->cf))504 return j;505 }506 j++;507 }508 }509 else510 {511 loop512 {513 if (j > ende) return -1;514 #if defined(PDEBUG) || defined(PDIV_DEBUG)515 if (p_LmShortDivisibleBy(strat->S[j], strat->sevS[j],516 p, not_sev, currRing))517 #else518 if ( !(strat->sevS[j] & not_sev) &&519 p_LmDivisibleBy(strat->S[j], p, currRing))520 #endif521 {522 return j;523 }524 j++;525 }526 }527 }528 529 int kFindNextDivisibleByInS_noCF(const kStrategy strat, int start,int max_ind, LObject* L)530 {531 unsigned long not_sev = ~L->sev;532 poly p = L->GetLmCurrRing();533 int j = start;534 535 pAssume(~not_sev == p_GetShortExpVector(p, currRing));536 #if 1537 int ende=max_ind;538 #else539 int ende=strat->sl;540 #endif541 493 loop 542 494 { … … 557 509 558 510 #ifdef HAVE_RINGS 559 static long ind2(long arg)560 {561 if (arg <= 0) return 0;562 long ind = 0;563 while (arg%2 == 0)564 {565 arg = arg / 2;566 ind++;567 }568 return ind;569 }570 571 511 static long ind_fact_2(long arg) 572 512 { … … 576 516 while (arg > 0) 577 517 { 578 ind += ind2(arg);518 ind += SI_LOG2_LONG(arg); 579 519 arg = arg - 2; 580 520 } … … 595 535 596 536 int k_ind2 = 0; 597 int a_ind2 = ind2(a);537 int a_ind2 = SI_LOG2_LONG(a); 598 538 599 539 // unsigned long k = 1; … … 621 561 s_exp = s_exp - 1; 622 562 } 623 while ( (0 < ind2(s_exp)) && (ind2(s_exp) <= too_much) )624 { 625 too_much = too_much - ind2(s_exp);563 while ( (0 < SI_LOG2_LONG(s_exp)) && (SI_LOG2_LONG(s_exp) <= too_much) ) 564 { 565 too_much = too_much - SI_LOG2_LONG(s_exp); 626 566 s_exp = s_exp - 2; 627 567 } … … 2207 2147 && (nonorm) 2208 2148 && (!n_DivBy(pGetCoeff(P.p),pGetCoeff(strat->S[j]),currRing->cf))) 2209 j=kFindNextDivisibleByInS _noCF(strat,j+1,max_ind,&P);2149 j=kFindNextDivisibleByInS(strat,j+1,max_ind,&P); 2210 2150 if (j>=0) 2211 2151 { … … 2215 2155 { 2216 2156 int sll; 2217 jj=kFindNextDivisibleByInS _noCF(strat,jj+1,max_ind,&P);2157 jj=kFindNextDivisibleByInS(strat,jj+1,max_ind,&P); 2218 2158 if (jj<0) break; 2219 2159 if ((!nonorm)
Note: See TracChangeset
for help on using the changeset viewer.