Changeset a0d9be in git


Ignore:
Timestamp:
Jun 10, 2010, 2:54:59 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '0604212ebb110535022efecad887940825b97c3f')
Children:
6e0750067834212a8910aad022e669ca646b5786
Parents:
407ff05c12f210a6f1d860dac19e7850c61d38ea
Message:
pCleardenom -> p_Cleardenom,
pCleardenom_n -> p_Cleardenom_n,
pContent -> p_Content



git-svn-id: file:///usr/local/Singular/svn/trunk@12848 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
kernel
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • kernel/clapsing.cc

    r407ff05 ra0d9be  
    2828poly singclap_gcd_r ( poly f, poly g, const ring r )
    2929{
    30   // assume pCleardenom is done
     30  // assume p_Cleardenom is done
    3131  // assume f!=0, g!=0
    3232  poly res=NULL;
     
    102102  poly res=NULL;
    103103
    104   if (f!=NULL) pCleardenom(f);
    105   if (g!=NULL) pCleardenom(g);
    106   else         return f; // g==0 => gcd=f (but do a pCleardenom)
    107   if (f==NULL) return g; // f==0 => gcd=g (but do a pCleardenom)
     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)
    108108
    109109  res=singclap_gcd_r(f,g,currRing);
     
    169169      //Variable X(i+rPar(currRing));
    170170      number nf,ng;
    171       pCleardenom_n(f,nf);pCleardenom_n(g,ng);
     171      p_Cleardenom_n(f, currRing,nf);p_Cleardenom_n(g, currRing,ng);
    172172      int ef,eg;
    173173      ef=pGetExp_Var(f,i);
     
    797797      if (with_exps==0)
    798798        N=nCopy(n0);
    799       pCleardenom(f);
     799      p_Cleardenom(f, currRing);
    800800      NN=nDiv(n0,pGetCoeff(f));
    801801      nDelete(&n0);
     
    816816        N=nCopy(n0);
    817817      pNorm(f);
    818       pCleardenom(f);
     818      p_Cleardenom(f, currRing);
    819819      NN=nDiv(n0,pGetCoeff(f));
    820820      nDelete(&n0);
     
    11701170    //if (f!=NULL) // already tested at start of routine
    11711171    {
    1172       pCleardenom(f);
     1172      p_Cleardenom(f, currRing);
    11731173    }
    11741174  }
     
    11791179    {
    11801180      pNorm(f);
    1181       pCleardenom(f);
     1181      p_Cleardenom(f, currRing);
    11821182    }
    11831183  }
     
    12901290      {
    12911291        p=pCopy(p);
    1292         pCleardenom(p);
     1292        p_Cleardenom(p, currRing);
    12931293        L.append(convSingPFactoryP(p));
    12941294      }
     
    13071307      {
    13081308        p=pCopy(p);
    1309         pCleardenom(p);
     1309        p_Cleardenom(p, currRing);
    13101310        L.append(convSingTrPFactoryP(p));
    13111311      }
  • kernel/fglmcomb.cc

    r407ff05 ra0d9be  
    377377            }
    378378        }
    379         pContent( result );
     379        p_Content( result, currRing );
    380380        if ( ! nGreaterZero( pGetCoeff( result ) ) ) result= pNeg( result );
    381381    }
  • kernel/gr_kstd2.cc

    r407ff05 ra0d9be  
    102102      if (TEST_OPT_INTSTRATEGY)
    103103      {
    104         if (rField_is_Zp_a()) pContent(h->p);
    105         else h->pCleardenom();// also does a pContent
     104        if (rField_is_Zp_a()) p_Content(h->p,currRing);
     105        else h->pCleardenom();// also does a p_Content
    106106      }
    107107      /*computes the ecart*/
     
    232232  if (!TEST_OPT_INTSTRATEGY)
    233233  {
    234     if (rField_is_Zp_a()) pContent(h->p);
     234    if (rField_is_Zp_a()) p_Content(h->p,currRing);
    235235    else h->pCleardenom();// also does a pContentRat
    236236  }
     
    269269        if (!TEST_OPT_INTSTRATEGY)
    270270        {
    271           if (rField_is_Zp_a()) pContent(h->p);
    272           else h->pCleardenom();// also does a pContent
     271          if (rField_is_Zp_a()) p_Content(h->p,currRing);
     272          else h->pCleardenom();// also does a p_Content
    273273        }
    274274
     
    468468        if (TEST_OPT_INTSTRATEGY)
    469469        {
    470           if (rField_is_Zp_a()) pContent(h->p);
     470          if (rField_is_Zp_a()) p_Content(h->p,currRing);
    471471          else h->pCleardenom();// also does a pContent
    472472        }
     
    492492        if (TEST_OPT_INTSTRATEGY)
    493493        {
    494           if (rField_is_Zp_a()) pContent(h->p);
    495           else h->pCleardenom();// also does a pContent
     494          if (rField_is_Zp_a()) p_Content(h->p,currRing);
     495          else h->pCleardenom();// also does a p_Content
    496496        }
    497497/*
     
    553553//        {
    554554//          if (TEST_OPT_DEBUG) PrintS(" > syzComp\n");
    555 //          if (TEST_OPT_INTSTRATEGY) pContent(h->p);
     555//          if (TEST_OPT_INTSTRATEGY) p_Content(h->p,currRing);
    556556//          enterTBba((*h),strat->tl+1,strat);
    557557//          return;
     
    568568        if (TEST_OPT_INTSTRATEGY)
    569569        {
    570           pContent(h->p);
    571           //pCleardenom(h->p);// also does a pContent
     570          p_Content(h->p,currRing);
     571          //pCleardenom(h->p);// also does a p_Content
    572572        }
    573573      }
     
    612612        if (TEST_OPT_INTSTRATEGY)
    613613        {
    614           if (rField_is_Zp_a()) pContent(h->p);
    615           else h->pCleardenom();// also does a pContent
     614          if (rField_is_Zp_a()) p_Content(h->p,currRing);
     615          else h->pCleardenom();// also does a p_Content
    616616        }
    617617        enterT((*h),strat);
     
    729729      if (TEST_OPT_INTSTRATEGY)
    730730      {
    731         //pContent(h->p);
    732         h->pCleardenom();// also does a pContent
     731        h->pCleardenom();// also does a p_Content
    733732      }
    734733      /* compute the ecart */
     
    743742//          if (TEST_OPT_DEBUG)
    744743//            PrintS("  >syzComp\n");
    745 //          if (TEST_OPT_INTSTRATEGY) pContent(h->p);
     744//          if (TEST_OPT_INTSTRATEGY) p_Content(h->p,currRing);
    746745//          at=strat->posInT(strat->T,strat->tl,(*h));
    747746//          enterTBba((*h),at,strat);
     
    795794        if (TEST_OPT_INTSTRATEGY)
    796795        {
    797           //pContent(h->p);
    798           h->pCleardenom();// also does a pContent
     796          h->pCleardenom();// also does a p_Content
    799797        }
    800798        enterT((*h),strat);
     
    913911//          if (TEST_OPT_DEBUG)
    914912//            PrintS(" >syzComp\n");
    915 //          if (TEST_OPT_INTSTRATEGY) pContent(h->p);
     913//          if (TEST_OPT_INTSTRATEGY) p_Content(h->p,currRing);
    916914//          at=strat->posInT(strat->T,strat->tl,(*h));
    917915//          enterTBba((*h),at,strat);
     
    950948        if (TEST_OPT_INTSTRATEGY)
    951949        {
    952           //pContent(h->p);
    953           h->pCleardenom();// also does a pContent
     950          h->pCleardenom();// also does a p_Content
    954951        }
    955952        enterT((*h),strat);
     
    12181215            }
    12191216
    1220             strat->P.p=pCleardenom(strat->P.p);
     1217            strat->P.p=p_Cleardenom(strat->P.p, currRing);
    12211218          }
    12221219          else
  • kernel/gring.cc

    r407ff05 ra0d9be  
    14241424  out = p_Add_q(p2,N,r);
    14251425  p_Test(out,r);
    1426   if ( out!=NULL ) pContent(out);
     1426  if ( out!=NULL ) p_Content(out,r);
    14271427  p_Delete(&m,r);
    14281428  n_Delete(&cF,r);
     
    14911491  out = p_Add_q(p2,N,r); // delete N, p2
    14921492  p_Test(out,r);
    1493   if ( out!=NULL ) pContent(out);
     1493  if ( out!=NULL ) p_Content(out,r);
    14941494  return(out);
    14951495}
     
    15791579  p_Test(M2,r);
    15801580#endif
    1581   if (M2!=NULL) M2=pCleardenom(M2);
    1582   //if (M2!=NULL) pContent(M2); // done by pCleardenom
     1581  if (M2!=NULL) M2=p_Cleardenom(M2,r);
     1582  //if (M2!=NULL) p_Content(M2); // done by pCleardenom
    15831583  return(M2);
    15841584}
     
    18551855#endif
    18561856
    1857   if (M2!=NULL) pCleardenom(M2); //?
    1858 //  if (M2!=NULL) pContent(M2);
     1857  if (M2!=NULL) p_Cleardenom(M2,r);
     1858//  if (M2!=NULL) p_Content(M2);
    18591859
    18601860  return(M2);
     
    20802080    poly pp = nc_mm_Mult_pp(m,p,currRing);
    20812081    number c2,cc;
    2082     pCleardenom_n(pp,c2);
     2082    p_Cleardenom_n(pp,currRing,c2);
    20832083    pDelete(&m);
    20842084    ctmp = kBucketPolyRed(b,pp,pLength(pp),NULL);
     
    21132113    poly pp = nc_mm_Mult_pp(m,p,currRing);
    21142114    number c2,cc;
    2115     pCleardenom_n(pp,c2);
     2115    p_Cleardenom_n(pp,currRing,c2);
    21162116    pDelete(&m);
    21172117    ctmp = kBucketPolyRed(b,pp,pLength(pp),NULL);
  • kernel/kInline.cc

    r407ff05 ra0d9be  
    423423{
    424424  assume(p != NULL);
    425   #ifdef HAVE_RATGRING
    426   p= ::pCleardenom(p);
    427   #else
    428   ::pCleardenom(p);
    429   #endif
    430425  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  }
    432438}
    433439
     
    979985
    980986  int i;
    981   long x;
    982   long e1;
    983   long e2;
    984   long s;
     987  int x;
     988  int e1;
     989  int e2;
     990  int s;
    985991  m1 = p_Init(tailRing);
    986992  m2 = p_Init(tailRing);
    987993  lcm = p_Init(leadRing);
    988994
    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--)
    993996  {
    994997    e1 = p_GetExp(p1,i,leadRing);
     
    9981001    {
    9991002      p_SetExp(m2,i,x, tailRing);
    1000       p_SetExp(m1,i,0, tailRing);
     1003      //p_SetExp(m1,i,0, tailRing); // done by p_Init
    10011004      s = e1;
    10021005    }
     
    10041007    {
    10051008      p_SetExp(m1,i,-x, tailRing);
    1006       p_SetExp(m2,i,0, tailRing);
     1009      //p_SetExp(m2,i,0, tailRing); // done by p_Init
    10071010      s = e2;
    10081011    }
    10091012    p_SetExp(lcm,i,s, leadRing);
    10101013  }
     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
    10111023
    10121024  p_Setm(m1, tailRing);
  • kernel/kstdfac.cc

    r407ff05 ra0d9be  
    331331    if (TEST_OPT_INTSTRATEGY)
    332332    {
    333       strat->S[si]=pCleardenom(strat->S[si]);
     333      strat->S[si]=p_Cleardenom(strat->S[si], currRing);
    334334    }
    335335    if (TEST_OPT_PROT)
  • kernel/kutil.cc

    r407ff05 ra0d9be  
    54025402            {
    54035403              //pContent(strat->S[i]);
    5404               strat->S[i]=pCleardenom(strat->S[i]);// also does a pContent
     5404              strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
    54055405            }
    54065406            else
     
    54715471            if (TEST_OPT_INTSTRATEGY)
    54725472            {
    5473               strat->S[i]=pCleardenom(strat->S[i]);// also does a pContent
     5473              strat->S[i]=p_Cleardenom(strat->S[i], currRing);// also does a pContent
    54745474            }
    54755475            else
     
    61226122        strat->S[i] = redtail(strat->S[i], strat->sl, strat);
    61236123      if (TEST_OPT_INTSTRATEGY)
    6124         strat->S[i]=pCleardenom(strat->S[i]);
     6124        strat->S[i]=p_Cleardenom(strat->S[i], currRing);
    61256125    }
    61266126    if (TEST_OPT_PROT)
  • kernel/polys.h

    r407ff05 ra0d9be  
    363363#define   pOne()   p_One(currRing)
    364364
    365 void      pContent(poly p);
     365void      p_Content(poly p, const ring r);
    366366void      pSimpleContent(poly p, int s);
    367 poly      pCleardenom(poly p);
    368 void      pCleardenom_n(poly p,number &c);
     367poly      p_Cleardenom(poly p, const ring r);
     368void      p_Cleardenom_n(poly p, const ring r,number &c);
    369369void      p_Normalize(poly p,const ring r);
    370370number    p_GetAllDenom(poly ph, const ring r);
  • kernel/polys1.cc

    r407ff05 ra0d9be  
    484484number pInitContent_a(poly ph);
    485485
    486 void pContent(poly ph)
     486void p_Content(poly ph, const ring r)
    487487{
    488488#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))
    492492    {
    493493      number k = nGetUnit(pGetCoeff(ph));
     
    527527      p=ph;
    528528    }
    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)))
    531531    {
    532532      h=pInitContent_a(ph);
     
    541541    {
    542542      nNormalize(pGetCoeff(p));
    543       d=nGcd(h,pGetCoeff(p),currRing);
     543      d=nGcd(h,pGetCoeff(p),r);
    544544      nDelete(&h);
    545545      h = d;
     
    578578    }
    579579#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);
    584584      p=ph;
    585585      while (p!=NULL)
     
    589589        while (c_n!=NULL)
    590590        { // 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);
    593593          hzz=d;
    594594          pIter(c_n);
     
    597597        while (c_n!=NULL)
    598598        { // 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);
    601601          h=d;
    602602          pIter(c_n);
     
    609609      number hzztmp=nlInvers(hzz);
    610610      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);
    616616      h=nlMult(hh,hg);
    617       nlDelete(&hg,currRing->algring);
    618       nlDelete(&hh,currRing->algring);
     617      nlDelete(&hg,r->algring);
     618      nlDelete(&hh,r->algring);
    619619      nlNormalize(h);
    620620      if(!nlIsOne(h))
     
    629629            d=nlMult(h,pGetCoeff(c_n));
    630630            nlNormalize(d);
    631             nlDelete(&pGetCoeff(c_n),currRing->algring);
     631            nlDelete(&pGetCoeff(c_n),r->algring);
    632632            pGetCoeff(c_n)=d;
    633633            pIter(c_n);
     
    638638            d=nlMult(h,pGetCoeff(c_n));
    639639            nlNormalize(d);
    640             nlDelete(&pGetCoeff(c_n),currRing->algring);
     640            nlDelete(&pGetCoeff(c_n),r->algring);
    641641            pGetCoeff(c_n)=d;
    642642            pIter(c_n);
     
    645645        }
    646646      }
    647       nlDelete(&h,currRing->algring);
     647      nlDelete(&h,r->algring);
    648648    }
    649649  }
     
    943943#endif
    944944
    945 poly pCleardenom(poly ph)
     945poly p_Cleardenom(poly ph, const ring r)
    946946{
    947947  poly start=ph;
     
    950950
    951951#ifdef HAVE_RINGS
    952   if (rField_is_Ring(currRing))
    953   {
    954     pContent(ph);
     952  if (rField_is_Ring(r))
     953  {
     954    p_Content(ph,r);
    955955    return start;
    956956  }
    957957#endif
    958   if (rField_is_Zp() && TEST_OPT_INTSTRATEGY) return start;
     958  if (rField_is_Zp(r) && TEST_OPT_INTSTRATEGY) return start;
    959959  p = ph;
    960960  if(pNext(p)==NULL)
     
    10551055    if (h!=NULL) nDelete(&h);
    10561056 
    1057     pContent(ph);
     1057    p_Content(ph,r);
    10581058#ifdef HAVE_RATGRING
    1059     if (rIsRatGRing(currRing))
     1059    if (rIsRatGRing(r))
    10601060    {
    10611061      /* quick unit detection in the rational case is done in gr_nc_bba */
     
    10681068}
    10691069
    1070 void pCleardenom_n(poly ph,number &c)
     1070void p_Cleardenom_n(poly ph,const ring r,number &c)
    10711071{
    10721072  number d, h;
     
    10851085    {
    10861086      nNormalize(pGetCoeff(p));
    1087       d=nLcm(h,pGetCoeff(p),currRing);
     1087      d=nLcm(h,pGetCoeff(p),r);
    10881088      nDelete(&h);
    10891089      h=d;
     
    11211121          while (p!=NULL)
    11221122          {
    1123             d=nLcm(h,pGetCoeff(p),currRing);
     1123            d=nLcm(h,pGetCoeff(p),r);
    11241124            nDelete(&h);
    11251125            h=d;
  • kernel/rintegers.cc

    r407ff05 ra0d9be  
    161161BOOLEAN nrzIsOne (number a)
    162162{
    163   return 0 == mpz_cmp_si((int_number) a, 1);
     163  return (a!=NULL) && (0 == mpz_cmp_si((int_number) a, 1));
    164164}
    165165
    166166BOOLEAN nrzIsMOne (number a)
    167167{
    168   return 0 == mpz_cmp_si((int_number) a, -1);
     168  return (a!=NULL) && (0 == mpz_cmp_si((int_number) a, -1));
    169169}
    170170
  • kernel/sca.cc

    r407ff05 ra0d9be  
    834834  poly spoly = p_Add_q (tmp1, tmp2, r); // spoly = spoly(lt(p1), lt(p2)) + m1 * tail(p1), delete tmp1,2
    835835
    836   if (spoly!=NULL) pCleardenom (spoly); // r?
    837 //  if (spoly!=NULL) pContent (spoly); // r?
     836  if (spoly!=NULL) p_Cleardenom (spoly, r);
     837//  if (spoly!=NULL) p_Content (spoly); // r?
    838838
    839839#ifdef PDEBUG
     
    910910  p2 = p_Add_q(p2, T, r);
    911911
    912   if ( p2!=NULL ) pContent(p2); // r?
     912  if ( p2!=NULL ) p_Content(p2,r);
    913913
    914914#ifdef PDEBUG
     
    939939    if (TEST_OPT_INTSTRATEGY)
    940940    {
    941       pCleardenom(h.p);
     941      p_Cleardenom(h.p, currRing);
    942942    }
    943943    else
    944944    {
    945945      pNorm(h.p);
    946       pContent(h.p);
     946      p_Content(h.p,currRing);
    947947    }
    948948
     
    954954      {
    955955//        pCleardenom(h.p);
    956         pContent(h.p);
     956        p_Content(h.p,currRing);
    957957      }
    958958      else
     
    11761176        if (TEST_OPT_INTSTRATEGY)
    11771177        {
    1178 //           h.pCleardenom(); // also does a pContent
    1179           pContent(h.p);
     1178//           h.pCleardenom(); // also does a p_Content
     1179          p_Content(h.p,currRing);
    11801180        }
    11811181        else
     
    17681768
    17691769              if (TEST_OPT_INTSTRATEGY)
    1770                 h.pCleardenom(); // also does a pContent
     1770                h.pCleardenom(); // also does a p_Content
    17711771              else
    17721772                h.pNorm();
     
    19501950        if (TEST_OPT_INTSTRATEGY)
    19511951        {
    1952 //          pContent(h.p);
    1953           h.pCleardenom(); // also does a pContent
     1952//          p_Content(h.p);
     1953          h.pCleardenom(); // also does a p_Content
    19541954        }
    19551955        else
     
    22442244
    22452245              if (TEST_OPT_INTSTRATEGY)
    2246                 h.pCleardenom(); // also does a pContent
     2246                h.pCleardenom(); // also does a p_Content
    22472247              else
    22482248                h.pNorm();
     
    23962396
    23972397        if (TEST_OPT_INTSTRATEGY)
    2398            h.pCleardenom(); // also does a pContent
     2398           h.pCleardenom(); // also does a p_Content
    23992399        else
    24002400          h.pNorm();
  • kernel/sparsmat.cc

    r407ff05 ra0d9be  
    25052505    {
    25062506      x = nCopy(pGetCoeff(a));
    2507       pCleardenom(a);
     2507      p_Cleardenom(a, currRing);
    25082508      y = nDiv(x,pGetCoeff(a));
    25092509      nDelete(&x);
  • kernel/syz.cc

    r407ff05 ra0d9be  
    176176      if (TEST_OPT_PROT) PrintS("f");
    177177      actWith = syz->m[i];
    178       if (!rField_has_simple_inverse()) pCleardenom(actWith);
     178      if (!rField_has_simple_inverse()) p_Cleardenom(actWith, currRing);
    179179//Print("actWith: ");pWrite(actWith);
    180180      syz->m[i] = NULL;
     
    242242  if ((till<=0) || (till>IDELEMS(syz))) till = IDELEMS(syz);
    243243  syz->m[elnum] = NULL;
    244   if (!rField_has_simple_inverse()) pCleardenom(actWith);
     244  if (!rField_has_simple_inverse()) p_Cleardenom(actWith, currRing);
    245245/*--makes Gauss alg. for the column ModComp--*/
    246246  pTakeOutComp(&(actWith), ModComp, &unit1, &lu);
  • kernel/tgb.cc

    r407ff05 ra0d9be  
    4141static omBin lm_bin=NULL;
    4242
    43 static void simplify_poly(poly p, ring r) {
     43static void simplify_poly(poly p, ring r)
     44{
    4445     assume(r==currRing);
    4546     if (!rField_is_Zp(r))
    4647     {
    47         pCleardenom(p);
    48         pContent(p); //is a duplicate call, but belongs here
     48        p_Cleardenom(p,r);
     49        //p_Content(p,r); //is a duplicate call, but belongs here
    4950     }
    5051     else
     
    854855
    855856
    856 static int add_to_reductors(slimgb_alg* c, poly h, int len, int ecart, BOOLEAN simplified){
     857static int add_to_reductors(slimgb_alg* c, poly h, int len, int ecart, BOOLEAN simplified)
     858{
    857859  //inDebug(h);
    858860  assume(lenS_correct(c->strat));
     
    869871  P.ecart=ecart;
    870872  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
    875879
    876880      }
     
    13081312  sorted_pair_node** nodes=(sorted_pair_node**) omalloc(sizeof(sorted_pair_node*)*i);
    13091313  int spc=0;
    1310   if(c->n>c->array_lengths){
     1314  if(c->n>c->array_lengths)
     1315  {
    13111316    c->array_lengths=c->array_lengths*2;
    13121317    assume(c->array_lengths>=c->n);
     
    13341339    ENLARGE(c->T_deg_full,int);
    13351340  sugar=c->T_deg[i]=c->pTotaldegree(h);
    1336   if(c->T_deg_full){
     1341  if(c->T_deg_full)
     1342  {
    13371343    sugar=c->T_deg_full[i]=c->pTotaldegree_full(h);
    13381344    ecart=sugar-c->T_deg[i];
     
    13511357  //necessary for correct weighted length
    13521358
    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
    13561363
    13571364  }
     
    24782485    {
    24792486#ifdef HAVE_PLURAL
    2480       if (c->nc){
     2487      if (c->nc)
     2488      {
    24812489        h= nc_CreateSpoly(c->S->m[s->i], c->S->m[s->j]/*, NULL*/, c->r);
    24822490
    24832491        if (h!=NULL)
    2484           pCleardenom(h);
     2492          p_Cleardenom(h, c->r);
    24852493      }
    24862494      else
     
    28382846        p_Test(p,r);
    28392847        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);
    28432852        }*/
    28442853
     
    30023011      si->expected_length=pQuality(I->m[i],this,pLength(I->m[i]));
    30033012      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);
    30063016      }
    30073017      si->lcm_of_lm=I->m[i];
     
    34573467          if (!rField_is_Zp(r))
    34583468          {
    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);
    34633474          //TODO:GCD of TERMS
    34643475          poly got=::gcd_of_terms(h,r);
     
    39653976    if (!rField_is_Zp(c->r))
    39663977    {
    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);
    39703980    }
    39713981    else
     
    43714381        if (!c->nc)
    43724382            p=redTailShort(p, c->strat);
    4373         pCleardenom(p);
    4374         pContent(p);
     4383        p_Cleardenom(p, c->r);
     4384        p_Content(p, c->r);
    43754385      }
    43764386      si->expected_length=pQuality(p,c,pLength(p));
     
    44844494    if (!rField_is_Zp(c->r))
    44854495    {
    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);
    44904498    }
    44914499    pNormalize(red);
    4492     if (c->eliminationProblem){
     4500    if (c->eliminationProblem)
     4501    {
    44934502        r[rn].sugar=c->pTotaldegree_full(red);
    44944503    }
    44954504
    4496     if ((!(erg.fromS))&&(TEST_V_UPTORADICAL)){
    4497 
     4505    if ((!(erg.fromS))&&(TEST_V_UPTORADICAL))
     4506    {
    44984507         if (polynomial_root(red,c->r))
    44994508            lt_changed=TRUE;
    4500             sev=p_GetShortExpVector(red,c->r);}
     4509            sev=p_GetShortExpVector(red,c->r);
     4510    }
    45014511    red_len=pLength(red);
    45024512  }
Note: See TracChangeset for help on using the changeset viewer.