Changeset 6f68e2b in git
- Timestamp:
- Sep 17, 2020, 4:45:37 PM (4 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- bbbc309031ddb6d2d4aaaa85bead583fd1860c07
- Parents:
- f61c736770348c2dfd0c8aa73d011e971b25ed16
- Location:
- factory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
factory/cf_factor.cc
rf61c736 r6f68e2b 616 616 else // multivariate, char 0 617 617 { 618 On (SW_RATIONAL);619 618 if (issqrfree) 620 619 { 621 620 #ifdef HAVE_NTL 621 On (SW_RATIONAL); 622 622 CFList factors= ratSqrfFactorize (fz); 623 623 for (CFListIterator i= factors; i.hasItem(); i++) … … 630 630 { 631 631 #ifdef HAVE_NTL 632 On (SW_RATIONAL); 632 633 F = ratFactorize (fz); 633 634 #else … … 635 636 #endif 636 637 } 637 Off (SW_RATIONAL);638 638 } 639 639 … … 641 641 if ( on_rational ) 642 642 On(SW_RATIONAL); 643 else 644 Off(SW_RATIONAL); 643 645 if ( ! cd.isOne() ) 644 646 { -
factory/fac_multivar.cc
rf61c736 r6f68e2b 161 161 { 162 162 find_good_prime(i.coeff(),start); 163 if ( 0==cf_getSmallPrime(start)) return;163 if (start==cf_getNumSmallPrimes()) return; 164 164 if((i.exp()!=0) && ((i.exp() % cf_getSmallPrime(start))==0)) 165 165 { 166 166 start++; 167 if (start==cf_getNumSmallPrimes()) return; 167 168 i=f; 168 169 } … … 176 177 if (f.inZ()) 177 178 { 178 if ( 0==cf_getSmallPrime(start)) return;179 if (start==cf_getNumSmallPrimes()) return; 179 180 while((!f.isZero()) && (mod(f,cf_getSmallPrime(start))==0)) 180 181 { 181 182 start++; 182 if ( 0==cf_getSmallPrime(start)) return;183 if (start==cf_getNumSmallPrimes()) return; 183 184 } 184 185 } … … 271 272 find_good_prime(U0,i); 272 273 find_good_prime(U,i); 273 int p=cf_getSmallPrime(i); 274 int p; 275 if (i==cf_getNumSmallPrimes()) p=0; 276 else p=cf_getSmallPrime(i); 274 277 //printf("found:p=%d (%d)\n",p,i); 275 278 if (p==0) … … 283 286 prime_number=i; 284 287 } 285 288 else prime_number++; 286 289 // p!=0: 287 290 modpk bb=coeffBound_old(U0,p);
Note: See TracChangeset
for help on using the changeset viewer.