Changeset b7e5d0 in git
 Timestamp:
 Oct 3, 2012, 2:43:02 PM (10 years ago)
 Branches:
 (u'jengelhdatetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
 Children:
 e2207eba351aca1bc6ad9378cbc90bce52ff1fc3
 Parents:
 65b813a15472ad024e1b30ff11d4f966ec98b53a
 gitauthor:
 Hans Schoenemann <hannes@mathematik.unikl.de>20121003 14:43:02+02:00
 gitcommitter:
 Martin Lee <martinlee84@web.de>20130123 11:27:17+01:00
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

Singular/misc_ip.cc
r65b813 rb7e5d0 69 69 } 70 70 71 72 71 /* Factoring with Pollard's rho method. stolen from GMP/demos */ 73 72 static unsigned add[] = {4, 2, 4, 2, 4, 6, 2, 6}; 74 73 75 int factor_using_division (mpz_t t, unsigned int limit,lists primes, int *multiplicities,int &index, unsigned long bound)74 static int factor_using_division (mpz_t t, unsigned int limit,lists primes, int *multiplicities,int &index, unsigned long bound) 76 75 { 77 76 mpz_t q, r; … … 167 166 } 168 167 169 void factor_using_pollard_rho (mpz_t n, unsigned long a, lists primes, int * multiplicities,int &index)168 static void factor_using_pollard_rho (mpz_t n, unsigned long a, lists primes, int * multiplicities,int &index) 170 169 { 171 170 mpz_t x, x1, y, P; … … 284 283 } 285 284 286 void factor(mpz_t t,lists primes,int *multiplicities,int &index,unsigned long bound)285 static void factor_gmp (mpz_t t,lists primes,int *multiplicities,int &index,unsigned long bound) 287 286 { 288 287 unsigned int division_limit; … … 306 305 setListEntry(primes, index, t); 307 306 multiplicities[index++] = 1; 308 307 mpz_set_ui(t,1); 309 308 } 310 309 else … … 330 329 mpz_neg(nn,nn); 331 330 } 332 factor (nn,primes,multiplicities,index,pBound);331 factor_gmp(nn,primes,multiplicities,index,pBound); 333 332 } 334 333 … … 350 349 multiplicitiesL>m[i].data = (void*)multiplicities[i]; 351 350 } 352 delete[] multiplicities;351 omFree(multiplicities); 353 352 354 353 lists L=(lists)omAllocBin(slists_bin);
Note: See TracChangeset
for help on using the changeset viewer.