# Changeset 8acd267 in git

Ignore:
Timestamp:
Sep 29, 2010, 12:10:12 PM (13 years ago)
Branches:
Children:
ed65b8ac2bdf0cef1353911cef4a1aa9dfd599f4
Parents:
08076474d5b872058ae014f8e1e6d95434bc7f29
Message:
```re-established old ordering in result list of command 'primefactors' (kernel code, LIB code, docu)

Files:
5 edited

Unmodified
Removed
• ## Singular/LIB/general.lib

 r080764 { l = primefactors(number(id[ii]),q); list jdl=l[2]; jd = jd,jdl[1..size(jdl)]; list jdl=l[1]; jd = jd,jdl[1..size(jdl)]; kill jdl; rest=rest, l[1]; rest=rest, l[3]; } jd = simplify(jd,6);
• ## Singular/LIB/primdecint.lib

 r080764 ideal J = imap(R,J); for(j=1;j<=size(L[3]);j++) { if(L[3][j] > 1){ ex = 1; break; } for(j=1;j<=size(L[2]);j++) { if(L[2][j] > 1){ ex = 1; break; } } { "n = "+string(n); "size(L[3]) = "+string(size(L[3])); "size(L[2]) = "+string(size(L[2])); } int RT = rtimer; if((n > 1) && (n < size(L[3]))) if((n > 1) && (n < size(L[2]))) { //-----  Create n1 links l(1),...,l(n1), open all of them and compute  --------- //-----  standard basis for the primes L[2],...,L[n + 1].              --------- //-----  standard basis for the primes L[1][2],...,L[1][n + 1].              --------- for(i = 1; i <= n; i++) { p=int(L[2][i + 1]); nu=int(L[3][i + 1]); p=int(L[1][i + 1]); nu=int(L[2][i + 1]); link l(i) = "MPtcp:fork"; //            link l(i) = "ssi:fork"; } p = int(L[2][1]); nu = int(L[3][1]); p = int(L[1][1]); nu = int(L[2][1]); int t = timer; A[size(A)+1] = modp(J, p, nu); j = n + 2; while(j <= size(L[3]) + 1) while(j <= size(L[2]) + 1) { for(i = 1; i <= n; i++) A[size(A)+1] = read(l(i)); if(j <= size(L[3])) if(j <= size(L[2])) { p=int(L[2][j]); nu=int(L[3][j]); p=int(L[1][j]); nu=int(L[2][j]); write(l(i), quote(modp(eval(J), eval(p), eval(nu)))); j++; else { for(j=1;j<=size(L[3]);j++) { A[size(A)+1] = modp(J, L[2][j], L[3][j]); for(j=1;j<=size(L[2]);j++) { A[size(A)+1] = modp(J, L[1][j], L[2][j]); } }
• ## Singular/misc_ip.cc

 r080764 lists primes = (lists)omAllocBin(slists_bin); primes->Init(1000); int* multiplicities = new int[1000]; int positive=1; int positive=1; int probTest = 0; if (!nlIsZero(n)) mpz_set_ui(nn, 1); } if ((mpz_cmp_ui(nn, 1) > 0) && (mpz_probab_prime_p(nn, 25) != 0)) probTest = 1; } L->Init(4); if (positive==-1) mpz_neg(nn,nn); setListEntry(L, 0, nn); L->m[1].rtyp = LIST_CMD; L->m[1].data = (void*)primesL; L->m[2].rtyp = LIST_CMD; L->m[2].data = (void*)multiplicitiesL; int probTest = 0; if (mpz_probab_prime_p(nn, 25) != 0) probTest = 1; L->m[0].rtyp = LIST_CMD; L->m[0].data = (void*)primesL; L->m[1].rtyp = LIST_CMD; L->m[1].data = (void*)multiplicitiesL; setListEntry(L, 2, nn); L->m[3].rtyp =  INT_CMD; L->m[3].data = (void*)probTest; mpz_clear(nn); mpz_clear(pb); mpz_clear(b); mpz_clear(p); mpz_clear(sr);
• ## Singular/misc_ip.h

 r080764 /** * Factorises a given positive bigint number n into its prime factors less * Factorises a given bigint number n into its prime factors less * than or equal to a given bound, with corresponding multiplicities. * * The method finds all prime factors with multiplicities. If a non-zero * The method finds all prime factors with multiplicities. If a positive * bound is given, then only the prime factors <= pBound are being found. * In this case, there may remain an unfactored portion m of n. * Also, when n is negative, m will contain the sign. If n is zero, m will * be zero. * The method returns a list L filled with four entries: * L[1] contains the remainder m as int or bigint, depending on the size, * L[2] a list; L[2][i] contains the i-th prime factor as int or bigint *                     (sorted in ascending order), * L[3] a list; L[3][i] contains the multiplicity of L[2, i] in n as int * L[4] 1 iff the remainder m is probably a prime, 0 otherwise * L[1] a list; L[1][i] contains the i-th prime factor of |n| as int or *                      bigint (sorted in ascending order), * L[2] a list; L[2][i] contains the multiplicity of L[1, i] in |n| as int * L[3] contains the remainder m as int or bigint, depending on the size, * L[4] 1 iff |m| is probably a prime, 0 otherwise * * We thus have: n = L[1] * L[2][1]^L[3][1] * ... * L[2][k]^L[3][k], where * We thus have: n = L[1][1]^L[2][1] * ... * L[1][k]^L[2][k] * L[1], where * k is the number of mutually distinct prime factors (<= a provided non- * zero bound). * Note that for n = 0, L[2] and L[3] will be emtpy lists and L[4] will be * zero. * * @return the factorisation data in a SINGULAR-internal list
Note: See TracChangeset for help on using the changeset viewer.