Changeset a0d9be in git
- Timestamp:
- Jun 10, 2010, 2:54:59 PM (13 years ago)
- Branches:
- (u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
- Children:
- 6e0750067834212a8910aad022e669ca646b5786
- Parents:
- 407ff05c12f210a6f1d860dac19e7850c61d38ea
- Location:
- kernel
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/clapsing.cc
r407ff05 ra0d9be 28 28 poly singclap_gcd_r ( poly f, poly g, const ring r ) 29 29 { 30 // assume p Cleardenom is done30 // assume p_Cleardenom is done 31 31 // assume f!=0, g!=0 32 32 poly res=NULL; … … 102 102 poly res=NULL; 103 103 104 if (f!=NULL) p Cleardenom(f);105 if (g!=NULL) p Cleardenom(g);106 else return f; // g==0 => gcd=f (but do a p Cleardenom)107 if (f==NULL) return g; // f==0 => gcd=g (but do a p Cleardenom)104 if (f!=NULL) p_Cleardenom(f, currRing); 105 if (g!=NULL) p_Cleardenom(g, currRing); 106 else return f; // g==0 => gcd=f (but do a p_Cleardenom) 107 if (f==NULL) return g; // f==0 => gcd=g (but do a p_Cleardenom) 108 108 109 109 res=singclap_gcd_r(f,g,currRing); … … 169 169 //Variable X(i+rPar(currRing)); 170 170 number nf,ng; 171 p Cleardenom_n(f,nf);pCleardenom_n(g,ng);171 p_Cleardenom_n(f, currRing,nf);p_Cleardenom_n(g, currRing,ng); 172 172 int ef,eg; 173 173 ef=pGetExp_Var(f,i); … … 797 797 if (with_exps==0) 798 798 N=nCopy(n0); 799 p Cleardenom(f);799 p_Cleardenom(f, currRing); 800 800 NN=nDiv(n0,pGetCoeff(f)); 801 801 nDelete(&n0); … … 816 816 N=nCopy(n0); 817 817 pNorm(f); 818 p Cleardenom(f);818 p_Cleardenom(f, currRing); 819 819 NN=nDiv(n0,pGetCoeff(f)); 820 820 nDelete(&n0); … … 1170 1170 //if (f!=NULL) // already tested at start of routine 1171 1171 { 1172 p Cleardenom(f);1172 p_Cleardenom(f, currRing); 1173 1173 } 1174 1174 } … … 1179 1179 { 1180 1180 pNorm(f); 1181 p Cleardenom(f);1181 p_Cleardenom(f, currRing); 1182 1182 } 1183 1183 } … … 1290 1290 { 1291 1291 p=pCopy(p); 1292 p Cleardenom(p);1292 p_Cleardenom(p, currRing); 1293 1293 L.append(convSingPFactoryP(p)); 1294 1294 } … … 1307 1307 { 1308 1308 p=pCopy(p); 1309 p Cleardenom(p);1309 p_Cleardenom(p, currRing); 1310 1310 L.append(convSingTrPFactoryP(p)); 1311 1311 } -
kernel/fglmcomb.cc
r407ff05 ra0d9be 377 377 } 378 378 } 379 p Content( result);379 p_Content( result, currRing ); 380 380 if ( ! nGreaterZero( pGetCoeff( result ) ) ) result= pNeg( result ); 381 381 } -
kernel/gr_kstd2.cc
r407ff05 ra0d9be 102 102 if (TEST_OPT_INTSTRATEGY) 103 103 { 104 if (rField_is_Zp_a()) p Content(h->p);105 else h->pCleardenom();// also does a p Content104 if (rField_is_Zp_a()) p_Content(h->p,currRing); 105 else h->pCleardenom();// also does a p_Content 106 106 } 107 107 /*computes the ecart*/ … … 232 232 if (!TEST_OPT_INTSTRATEGY) 233 233 { 234 if (rField_is_Zp_a()) p Content(h->p);234 if (rField_is_Zp_a()) p_Content(h->p,currRing); 235 235 else h->pCleardenom();// also does a pContentRat 236 236 } … … 269 269 if (!TEST_OPT_INTSTRATEGY) 270 270 { 271 if (rField_is_Zp_a()) p Content(h->p);272 else h->pCleardenom();// also does a p Content271 if (rField_is_Zp_a()) p_Content(h->p,currRing); 272 else h->pCleardenom();// also does a p_Content 273 273 } 274 274 … … 468 468 if (TEST_OPT_INTSTRATEGY) 469 469 { 470 if (rField_is_Zp_a()) p Content(h->p);470 if (rField_is_Zp_a()) p_Content(h->p,currRing); 471 471 else h->pCleardenom();// also does a pContent 472 472 } … … 492 492 if (TEST_OPT_INTSTRATEGY) 493 493 { 494 if (rField_is_Zp_a()) p Content(h->p);495 else h->pCleardenom();// also does a p Content494 if (rField_is_Zp_a()) p_Content(h->p,currRing); 495 else h->pCleardenom();// also does a p_Content 496 496 } 497 497 /* … … 553 553 // { 554 554 // if (TEST_OPT_DEBUG) PrintS(" > syzComp\n"); 555 // if (TEST_OPT_INTSTRATEGY) p Content(h->p);555 // if (TEST_OPT_INTSTRATEGY) p_Content(h->p,currRing); 556 556 // enterTBba((*h),strat->tl+1,strat); 557 557 // return; … … 568 568 if (TEST_OPT_INTSTRATEGY) 569 569 { 570 p Content(h->p);571 //pCleardenom(h->p);// also does a p Content570 p_Content(h->p,currRing); 571 //pCleardenom(h->p);// also does a p_Content 572 572 } 573 573 } … … 612 612 if (TEST_OPT_INTSTRATEGY) 613 613 { 614 if (rField_is_Zp_a()) p Content(h->p);615 else h->pCleardenom();// also does a p Content614 if (rField_is_Zp_a()) p_Content(h->p,currRing); 615 else h->pCleardenom();// also does a p_Content 616 616 } 617 617 enterT((*h),strat); … … 729 729 if (TEST_OPT_INTSTRATEGY) 730 730 { 731 //pContent(h->p); 732 h->pCleardenom();// also does a pContent 731 h->pCleardenom();// also does a p_Content 733 732 } 734 733 /* compute the ecart */ … … 743 742 // if (TEST_OPT_DEBUG) 744 743 // PrintS(" >syzComp\n"); 745 // if (TEST_OPT_INTSTRATEGY) p Content(h->p);744 // if (TEST_OPT_INTSTRATEGY) p_Content(h->p,currRing); 746 745 // at=strat->posInT(strat->T,strat->tl,(*h)); 747 746 // enterTBba((*h),at,strat); … … 795 794 if (TEST_OPT_INTSTRATEGY) 796 795 { 797 //pContent(h->p); 798 h->pCleardenom();// also does a pContent 796 h->pCleardenom();// also does a p_Content 799 797 } 800 798 enterT((*h),strat); … … 913 911 // if (TEST_OPT_DEBUG) 914 912 // PrintS(" >syzComp\n"); 915 // if (TEST_OPT_INTSTRATEGY) p Content(h->p);913 // if (TEST_OPT_INTSTRATEGY) p_Content(h->p,currRing); 916 914 // at=strat->posInT(strat->T,strat->tl,(*h)); 917 915 // enterTBba((*h),at,strat); … … 950 948 if (TEST_OPT_INTSTRATEGY) 951 949 { 952 //pContent(h->p); 953 h->pCleardenom();// also does a pContent 950 h->pCleardenom();// also does a p_Content 954 951 } 955 952 enterT((*h),strat); … … 1218 1215 } 1219 1216 1220 strat->P.p=p Cleardenom(strat->P.p);1217 strat->P.p=p_Cleardenom(strat->P.p, currRing); 1221 1218 } 1222 1219 else -
kernel/gring.cc
r407ff05 ra0d9be 1424 1424 out = p_Add_q(p2,N,r); 1425 1425 p_Test(out,r); 1426 if ( out!=NULL ) p Content(out);1426 if ( out!=NULL ) p_Content(out,r); 1427 1427 p_Delete(&m,r); 1428 1428 n_Delete(&cF,r); … … 1491 1491 out = p_Add_q(p2,N,r); // delete N, p2 1492 1492 p_Test(out,r); 1493 if ( out!=NULL ) p Content(out);1493 if ( out!=NULL ) p_Content(out,r); 1494 1494 return(out); 1495 1495 } … … 1579 1579 p_Test(M2,r); 1580 1580 #endif 1581 if (M2!=NULL) M2=p Cleardenom(M2);1582 //if (M2!=NULL) p Content(M2); // done by pCleardenom1581 if (M2!=NULL) M2=p_Cleardenom(M2,r); 1582 //if (M2!=NULL) p_Content(M2); // done by pCleardenom 1583 1583 return(M2); 1584 1584 } … … 1855 1855 #endif 1856 1856 1857 if (M2!=NULL) p Cleardenom(M2); //?1858 // if (M2!=NULL) p Content(M2);1857 if (M2!=NULL) p_Cleardenom(M2,r); 1858 // if (M2!=NULL) p_Content(M2); 1859 1859 1860 1860 return(M2); … … 2080 2080 poly pp = nc_mm_Mult_pp(m,p,currRing); 2081 2081 number c2,cc; 2082 p Cleardenom_n(pp,c2);2082 p_Cleardenom_n(pp,currRing,c2); 2083 2083 pDelete(&m); 2084 2084 ctmp = kBucketPolyRed(b,pp,pLength(pp),NULL); … … 2113 2113 poly pp = nc_mm_Mult_pp(m,p,currRing); 2114 2114 number c2,cc; 2115 p Cleardenom_n(pp,c2);2115 p_Cleardenom_n(pp,currRing,c2); 2116 2116 pDelete(&m); 2117 2117 ctmp = kBucketPolyRed(b,pp,pLength(pp),NULL); -
kernel/kInline.cc
r407ff05 ra0d9be 423 423 { 424 424 assume(p != NULL); 425 #ifdef HAVE_RATGRING426 p= ::pCleardenom(p);427 #else428 ::pCleardenom(p);429 #endif430 425 if (t_p != NULL) 431 pSetCoeff0(t_p, pGetCoeff(p)); 426 { 427 p_Cleardenom(t_p, tailRing); 428 pSetCoeff0(p, pGetCoeff(t_p)); 429 } 430 else 431 { 432 #ifdef HAVE_RATGRING 433 p= p_Cleardenom(p, currRing); 434 #else 435 p_Cleardenom(p, currRing); 436 #endif 437 } 432 438 } 433 439 … … 979 985 980 986 int i; 981 longx;982 longe1;983 longe2;984 longs;987 int x; 988 int e1; 989 int e2; 990 int s; 985 991 m1 = p_Init(tailRing); 986 992 m2 = p_Init(tailRing); 987 993 lcm = p_Init(leadRing); 988 994 989 int small_index=1; 990 if ((pGetComp(p1)!=0)||(pGetComp(p2)!=0)) small_index=0; 991 992 for (i = leadRing->N; i>=small_index; i--) 995 for (i = leadRing->N; i>=1; i--) 993 996 { 994 997 e1 = p_GetExp(p1,i,leadRing); … … 998 1001 { 999 1002 p_SetExp(m2,i,x, tailRing); 1000 p_SetExp(m1,i,0, tailRing);1003 //p_SetExp(m1,i,0, tailRing); // done by p_Init 1001 1004 s = e1; 1002 1005 } … … 1004 1007 { 1005 1008 p_SetExp(m1,i,-x, tailRing); 1006 p_SetExp(m2,i,0, tailRing);1009 //p_SetExp(m2,i,0, tailRing); // done by p_Init 1007 1010 s = e2; 1008 1011 } 1009 1012 p_SetExp(lcm,i,s, leadRing); 1010 1013 } 1014 if ((s=pGetComp(p1))!=0) 1015 { 1016 p_SetComp(lcm,s, leadRing); 1017 } 1018 else if ((s=pGetComp(p2))!=0) 1019 { 1020 p_SetComp(lcm,s, leadRing); 1021 } 1022 // else p_SetComp(lcm,0,tailRing); // done by p_Init 1011 1023 1012 1024 p_Setm(m1, tailRing); -
kernel/kstdfac.cc
r407ff05 ra0d9be 331 331 if (TEST_OPT_INTSTRATEGY) 332 332 { 333 strat->S[si]=p Cleardenom(strat->S[si]);333 strat->S[si]=p_Cleardenom(strat->S[si], currRing); 334 334 } 335 335 if (TEST_OPT_PROT) -
kernel/kutil.cc
r407ff05 ra0d9be 5402 5402 { 5403 5403 //pContent(strat->S[i]); 5404 strat->S[i]=p Cleardenom(strat->S[i]);// also does a pContent5404 strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent 5405 5405 } 5406 5406 else … … 5471 5471 if (TEST_OPT_INTSTRATEGY) 5472 5472 { 5473 strat->S[i]=p Cleardenom(strat->S[i]);// also does a pContent5473 strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent 5474 5474 } 5475 5475 else … … 6122 6122 strat->S[i] = redtail(strat->S[i], strat->sl, strat); 6123 6123 if (TEST_OPT_INTSTRATEGY) 6124 strat->S[i]=p Cleardenom(strat->S[i]);6124 strat->S[i]=p_Cleardenom(strat->S[i], currRing); 6125 6125 } 6126 6126 if (TEST_OPT_PROT) -
kernel/polys.h
r407ff05 ra0d9be 363 363 #define pOne() p_One(currRing) 364 364 365 void p Content(poly p);365 void p_Content(poly p, const ring r); 366 366 void pSimpleContent(poly p, int s); 367 poly p Cleardenom(poly p);368 void p Cleardenom_n(poly p,number &c);367 poly p_Cleardenom(poly p, const ring r); 368 void p_Cleardenom_n(poly p, const ring r,number &c); 369 369 void p_Normalize(poly p,const ring r); 370 370 number p_GetAllDenom(poly ph, const ring r); -
kernel/polys1.cc
r407ff05 ra0d9be 484 484 number pInitContent_a(poly ph); 485 485 486 void p Content(poly ph)486 void p_Content(poly ph, const ring r) 487 487 { 488 488 #ifdef HAVE_RINGS 489 if (rField_is_Ring( currRing))490 { 491 if ((ph!=NULL) && rField_has_Units( currRing))489 if (rField_is_Ring(r)) 490 { 491 if ((ph!=NULL) && rField_has_Units(r)) 492 492 { 493 493 number k = nGetUnit(pGetCoeff(ph)); … … 527 527 p=ph; 528 528 } 529 else if ((rField_is_Extension( ))530 && ((rPar( currRing)>1)||(currRing->minpoly==NULL)))529 else if ((rField_is_Extension(r)) 530 && ((rPar(r)>1)||(r->minpoly==NULL))) 531 531 { 532 532 h=pInitContent_a(ph); … … 541 541 { 542 542 nNormalize(pGetCoeff(p)); 543 d=nGcd(h,pGetCoeff(p), currRing);543 d=nGcd(h,pGetCoeff(p),r); 544 544 nDelete(&h); 545 545 h = d; … … 578 578 } 579 579 #endif 580 if (rField_is_Q_a( ))581 { 582 number hzz = nlInit(1, currRing);583 h = nlInit(1, currRing);580 if (rField_is_Q_a(r)) 581 { 582 number hzz = nlInit(1, r); 583 h = nlInit(1, r); 584 584 p=ph; 585 585 while (p!=NULL) … … 589 589 while (c_n!=NULL) 590 590 { // each monom: coeff in Q 591 d=nlLcm(hzz,pGetCoeff(c_n), currRing->algring);592 n_Delete(&hzz, currRing->algring);591 d=nlLcm(hzz,pGetCoeff(c_n),r->algring); 592 n_Delete(&hzz,r->algring); 593 593 hzz=d; 594 594 pIter(c_n); … … 597 597 while (c_n!=NULL) 598 598 { // each monom: coeff in Q 599 d=nlLcm(h,pGetCoeff(c_n), currRing->algring);600 n_Delete(&h, currRing->algring);599 d=nlLcm(h,pGetCoeff(c_n),r->algring); 600 n_Delete(&h,r->algring); 601 601 h=d; 602 602 pIter(c_n); … … 609 609 number hzztmp=nlInvers(hzz); 610 610 number hh=nlMult(hzz,h); 611 nlDelete(&hzz, currRing->algring);612 nlDelete(&h, currRing->algring);613 number hg=nlGcd(hzztmp,htmp, currRing->algring);614 nlDelete(&hzztmp, currRing->algring);615 nlDelete(&htmp, currRing->algring);611 nlDelete(&hzz,r->algring); 612 nlDelete(&h,r->algring); 613 number hg=nlGcd(hzztmp,htmp,r->algring); 614 nlDelete(&hzztmp,r->algring); 615 nlDelete(&htmp,r->algring); 616 616 h=nlMult(hh,hg); 617 nlDelete(&hg, currRing->algring);618 nlDelete(&hh, currRing->algring);617 nlDelete(&hg,r->algring); 618 nlDelete(&hh,r->algring); 619 619 nlNormalize(h); 620 620 if(!nlIsOne(h)) … … 629 629 d=nlMult(h,pGetCoeff(c_n)); 630 630 nlNormalize(d); 631 nlDelete(&pGetCoeff(c_n), currRing->algring);631 nlDelete(&pGetCoeff(c_n),r->algring); 632 632 pGetCoeff(c_n)=d; 633 633 pIter(c_n); … … 638 638 d=nlMult(h,pGetCoeff(c_n)); 639 639 nlNormalize(d); 640 nlDelete(&pGetCoeff(c_n), currRing->algring);640 nlDelete(&pGetCoeff(c_n),r->algring); 641 641 pGetCoeff(c_n)=d; 642 642 pIter(c_n); … … 645 645 } 646 646 } 647 nlDelete(&h, currRing->algring);647 nlDelete(&h,r->algring); 648 648 } 649 649 } … … 943 943 #endif 944 944 945 poly p Cleardenom(poly ph)945 poly p_Cleardenom(poly ph, const ring r) 946 946 { 947 947 poly start=ph; … … 950 950 951 951 #ifdef HAVE_RINGS 952 if (rField_is_Ring( currRing))953 { 954 p Content(ph);952 if (rField_is_Ring(r)) 953 { 954 p_Content(ph,r); 955 955 return start; 956 956 } 957 957 #endif 958 if (rField_is_Zp( ) && TEST_OPT_INTSTRATEGY) return start;958 if (rField_is_Zp(r) && TEST_OPT_INTSTRATEGY) return start; 959 959 p = ph; 960 960 if(pNext(p)==NULL) … … 1055 1055 if (h!=NULL) nDelete(&h); 1056 1056 1057 p Content(ph);1057 p_Content(ph,r); 1058 1058 #ifdef HAVE_RATGRING 1059 if (rIsRatGRing( currRing))1059 if (rIsRatGRing(r)) 1060 1060 { 1061 1061 /* quick unit detection in the rational case is done in gr_nc_bba */ … … 1068 1068 } 1069 1069 1070 void p Cleardenom_n(poly ph,number &c)1070 void p_Cleardenom_n(poly ph,const ring r,number &c) 1071 1071 { 1072 1072 number d, h; … … 1085 1085 { 1086 1086 nNormalize(pGetCoeff(p)); 1087 d=nLcm(h,pGetCoeff(p), currRing);1087 d=nLcm(h,pGetCoeff(p),r); 1088 1088 nDelete(&h); 1089 1089 h=d; … … 1121 1121 while (p!=NULL) 1122 1122 { 1123 d=nLcm(h,pGetCoeff(p), currRing);1123 d=nLcm(h,pGetCoeff(p),r); 1124 1124 nDelete(&h); 1125 1125 h=d; -
kernel/rintegers.cc
r407ff05 ra0d9be 161 161 BOOLEAN nrzIsOne (number a) 162 162 { 163 return 0 == mpz_cmp_si((int_number) a, 1);163 return (a!=NULL) && (0 == mpz_cmp_si((int_number) a, 1)); 164 164 } 165 165 166 166 BOOLEAN nrzIsMOne (number a) 167 167 { 168 return 0 == mpz_cmp_si((int_number) a, -1);168 return (a!=NULL) && (0 == mpz_cmp_si((int_number) a, -1)); 169 169 } 170 170 -
kernel/sca.cc
r407ff05 ra0d9be 834 834 poly spoly = p_Add_q (tmp1, tmp2, r); // spoly = spoly(lt(p1), lt(p2)) + m1 * tail(p1), delete tmp1,2 835 835 836 if (spoly!=NULL) p Cleardenom (spoly); // r?837 // if (spoly!=NULL) p Content (spoly); // r?836 if (spoly!=NULL) p_Cleardenom (spoly, r); 837 // if (spoly!=NULL) p_Content (spoly); // r? 838 838 839 839 #ifdef PDEBUG … … 910 910 p2 = p_Add_q(p2, T, r); 911 911 912 if ( p2!=NULL ) p Content(p2); // r?912 if ( p2!=NULL ) p_Content(p2,r); 913 913 914 914 #ifdef PDEBUG … … 939 939 if (TEST_OPT_INTSTRATEGY) 940 940 { 941 p Cleardenom(h.p);941 p_Cleardenom(h.p, currRing); 942 942 } 943 943 else 944 944 { 945 945 pNorm(h.p); 946 p Content(h.p);946 p_Content(h.p,currRing); 947 947 } 948 948 … … 954 954 { 955 955 // pCleardenom(h.p); 956 p Content(h.p);956 p_Content(h.p,currRing); 957 957 } 958 958 else … … 1176 1176 if (TEST_OPT_INTSTRATEGY) 1177 1177 { 1178 // h.pCleardenom(); // also does a p Content1179 p Content(h.p);1178 // h.pCleardenom(); // also does a p_Content 1179 p_Content(h.p,currRing); 1180 1180 } 1181 1181 else … … 1768 1768 1769 1769 if (TEST_OPT_INTSTRATEGY) 1770 h.pCleardenom(); // also does a p Content1770 h.pCleardenom(); // also does a p_Content 1771 1771 else 1772 1772 h.pNorm(); … … 1950 1950 if (TEST_OPT_INTSTRATEGY) 1951 1951 { 1952 // p Content(h.p);1953 h.pCleardenom(); // also does a p Content1952 // p_Content(h.p); 1953 h.pCleardenom(); // also does a p_Content 1954 1954 } 1955 1955 else … … 2244 2244 2245 2245 if (TEST_OPT_INTSTRATEGY) 2246 h.pCleardenom(); // also does a p Content2246 h.pCleardenom(); // also does a p_Content 2247 2247 else 2248 2248 h.pNorm(); … … 2396 2396 2397 2397 if (TEST_OPT_INTSTRATEGY) 2398 h.pCleardenom(); // also does a p Content2398 h.pCleardenom(); // also does a p_Content 2399 2399 else 2400 2400 h.pNorm(); -
kernel/sparsmat.cc
r407ff05 ra0d9be 2505 2505 { 2506 2506 x = nCopy(pGetCoeff(a)); 2507 p Cleardenom(a);2507 p_Cleardenom(a, currRing); 2508 2508 y = nDiv(x,pGetCoeff(a)); 2509 2509 nDelete(&x); -
kernel/syz.cc
r407ff05 ra0d9be 176 176 if (TEST_OPT_PROT) PrintS("f"); 177 177 actWith = syz->m[i]; 178 if (!rField_has_simple_inverse()) p Cleardenom(actWith);178 if (!rField_has_simple_inverse()) p_Cleardenom(actWith, currRing); 179 179 //Print("actWith: ");pWrite(actWith); 180 180 syz->m[i] = NULL; … … 242 242 if ((till<=0) || (till>IDELEMS(syz))) till = IDELEMS(syz); 243 243 syz->m[elnum] = NULL; 244 if (!rField_has_simple_inverse()) p Cleardenom(actWith);244 if (!rField_has_simple_inverse()) p_Cleardenom(actWith, currRing); 245 245 /*--makes Gauss alg. for the column ModComp--*/ 246 246 pTakeOutComp(&(actWith), ModComp, &unit1, &lu); -
kernel/tgb.cc
r407ff05 ra0d9be 41 41 static omBin lm_bin=NULL; 42 42 43 static void simplify_poly(poly p, ring r) { 43 static void simplify_poly(poly p, ring r) 44 { 44 45 assume(r==currRing); 45 46 if (!rField_is_Zp(r)) 46 47 { 47 p Cleardenom(p);48 pContent(p); //is a duplicate call, but belongs here48 p_Cleardenom(p,r); 49 //p_Content(p,r); //is a duplicate call, but belongs here 49 50 } 50 51 else … … 854 855 855 856 856 static int add_to_reductors(slimgb_alg* c, poly h, int len, int ecart, BOOLEAN simplified){ 857 static int add_to_reductors(slimgb_alg* c, poly h, int len, int ecart, BOOLEAN simplified) 858 { 857 859 //inDebug(h); 858 860 assume(lenS_correct(c->strat)); … … 869 871 P.ecart=ecart; 870 872 P.FDeg=pFDeg(P.p,c->r); 871 if (!(simplified)){ 872 if (!rField_is_Zp(c->r)){ 873 pCleardenom(P.p); 874 pContent(P.p); //is a duplicate call, but belongs here 873 if (!(simplified)) 874 { 875 if (!rField_is_Zp(c->r)) 876 { 877 p_Cleardenom(P.p,c->r); 878 //p_Content(P.p,c->r ); //is a duplicate call, but belongs here 875 879 876 880 } … … 1308 1312 sorted_pair_node** nodes=(sorted_pair_node**) omalloc(sizeof(sorted_pair_node*)*i); 1309 1313 int spc=0; 1310 if(c->n>c->array_lengths){ 1314 if(c->n>c->array_lengths) 1315 { 1311 1316 c->array_lengths=c->array_lengths*2; 1312 1317 assume(c->array_lengths>=c->n); … … 1334 1339 ENLARGE(c->T_deg_full,int); 1335 1340 sugar=c->T_deg[i]=c->pTotaldegree(h); 1336 if(c->T_deg_full){ 1341 if(c->T_deg_full) 1342 { 1337 1343 sugar=c->T_deg_full[i]=c->pTotaldegree_full(h); 1338 1344 ecart=sugar-c->T_deg[i]; … … 1351 1357 //necessary for correct weighted length 1352 1358 1353 if (!rField_is_Zp(c->r)){ 1354 pCleardenom(h); 1355 pContent(h); //is a duplicate call, but belongs here 1359 if (!rField_is_Zp(c->r)) 1360 { 1361 p_Cleardenom(h, c->r); 1362 //p_Content(h,c->r); //is a duplicate call, but belongs here 1356 1363 1357 1364 } … … 2478 2485 { 2479 2486 #ifdef HAVE_PLURAL 2480 if (c->nc){ 2487 if (c->nc) 2488 { 2481 2489 h= nc_CreateSpoly(c->S->m[s->i], c->S->m[s->j]/*, NULL*/, c->r); 2482 2490 2483 2491 if (h!=NULL) 2484 p Cleardenom(h);2492 p_Cleardenom(h, c->r); 2485 2493 } 2486 2494 else … … 2838 2846 p_Test(p,r); 2839 2847 si->deg=this->pTotaldegree_full(p); 2840 /*if (!rField_is_Zp(r)){ 2841 pContent(p); 2842 pCleardenom(p); 2848 /*if (!rField_is_Zp(r)) 2849 { 2850 p_Content(p,r); 2851 p_Cleardenom(p,r); 2843 2852 }*/ 2844 2853 … … 3002 3011 si->expected_length=pQuality(I->m[i],this,pLength(I->m[i])); 3003 3012 si->deg=pTotaldegree(I->m[i]); 3004 if (!rField_is_Zp(r)){ 3005 pCleardenom(I->m[i]); 3013 if (!rField_is_Zp(r)) 3014 { 3015 p_Cleardenom(I->m[i], r); 3006 3016 } 3007 3017 si->lcm_of_lm=I->m[i]; … … 3457 3467 if (!rField_is_Zp(r)) 3458 3468 { 3459 pCleardenom(h); 3460 pContent(h); 3461 3462 } else pNorm(h); 3469 p_Cleardenom(h,r); 3470 //p_Content(h,r); 3471 3472 } 3473 else pNorm(h); 3463 3474 //TODO:GCD of TERMS 3464 3475 poly got=::gcd_of_terms(h,r); … … 3965 3976 if (!rField_is_Zp(c->r)) 3966 3977 { 3967 pCleardenom(clear_into);//should be unnecessary 3968 pContent(clear_into); 3969 3978 p_Cleardenom(clear_into,c->r);//should be unnecessary 3979 //p_Content(clear_into, c->r); 3970 3980 } 3971 3981 else … … 4371 4381 if (!c->nc) 4372 4382 p=redTailShort(p, c->strat); 4373 p Cleardenom(p);4374 p Content(p);4383 p_Cleardenom(p, c->r); 4384 p_Content(p, c->r); 4375 4385 } 4376 4386 si->expected_length=pQuality(p,c,pLength(p)); … … 4484 4494 if (!rField_is_Zp(c->r)) 4485 4495 { 4486 pCleardenom(red);//should be unnecessary 4487 pContent(red); 4488 4489 4496 p_Cleardenom(red, c->r);//should be unnecessary 4497 //p_Content(red, c->r); 4490 4498 } 4491 4499 pNormalize(red); 4492 if (c->eliminationProblem){ 4500 if (c->eliminationProblem) 4501 { 4493 4502 r[rn].sugar=c->pTotaldegree_full(red); 4494 4503 } 4495 4504 4496 if ((!(erg.fromS))&&(TEST_V_UPTORADICAL)) {4497 4505 if ((!(erg.fromS))&&(TEST_V_UPTORADICAL)) 4506 { 4498 4507 if (polynomial_root(red,c->r)) 4499 4508 lt_changed=TRUE; 4500 sev=p_GetShortExpVector(red,c->r);} 4509 sev=p_GetShortExpVector(red,c->r); 4510 } 4501 4511 red_len=pLength(red); 4502 4512 }
Note: See TracChangeset
for help on using the changeset viewer.