Changeset 2d3e75 in git


Ignore:
Timestamp:
May 6, 2014, 3:12:48 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', '2a584933abf2a2d3082034c7586d38bb6de1a30a')
Children:
8ee8872586f6afb3a56799c3ea783d6675f18263
Parents:
b743d90a6fd61ebb75fd6c95d5fa9eeb54ecc38e
Message:
towards a uniq n_Div: removing some of n_IntDiv
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    rb743d9 r2d3e75  
    11771177    return TRUE;
    11781178  }
    1179   q = n_IntDiv((number)u->Data(),q,coeffs_BIGINT);
     1179  q = n_Div((number)u->Data(),q,coeffs_BIGINT);
    11801180  n_Normalize(q,coeffs_BIGINT);
    11811181  res->data = (char *)q;
  • Singular/misc_ip.cc

    rb743d9 r2d3e75  
    12061206  basePackHdl=h;
    12071207
    1208   coeffs_BIGINT = nInitChar(n_Q,NULL);
     1208  coeffs_BIGINT = nInitChar(n_Q,(void*)1);
    12091209
    12101210#if 1
  • kernel/GBEngine/tgbgauss.cc

    rb743d9 r2d3e75  
    894894      while (p!=NULL)
    895895      {
    896         d = nIntDiv(p->coef,h);
     896        d = nExactDiv(p->coef,h);
    897897        nDelete(&p->coef);
    898898        p->coef=d;
  • libpolys/coeffs/longrat.cc

    rb743d9 r2d3e75  
    29332933  return NULL;
    29342934}
    2935 
    2936 BOOLEAN nlInitChar(coeffs r, void*)
     2935BOOLEAN nlCoeffIsEqual(const coeffs r, n_coeffType n, void *p)
     2936{
     2937  /* test, if r is an instance of nInitCoeffs(n,parameter) */
     2938  /* if paramater is not needed */
     2939  if (n==r->type)
     2940  {
     2941    if ((p==NULL)&&(r->cfDiv==nlDiv)) return TRUE;
     2942    if ((p!=NULL)&&(r->cfDiv!=nlDiv)) return TRUE;
     2943  }
     2944  return FALSE;
     2945}
     2946
     2947
     2948
     2949BOOLEAN nlInitChar(coeffs r, void*p)
    29372950{
    29382951  assume( getCoeffType(r) == ID );
    29392952  //const int ch = (int)(long)(p);
    29402953
    2941   r->nCoeffIsEqual=ndCoeffIsEqual;
     2954  r->nCoeffIsEqual=nlCoeffIsEqual;
    29422955  r->cfKillChar = ndKillChar; /* dummy */
    29432956  r->cfCoeffString=nlCoeffString;
     
    29492962  r->cfSub   = nlSub;
    29502963  r->cfAdd   = nlAdd;
    2951   r->cfDiv   = nlDiv;
     2964  if (p==NULL) r->cfDiv   = nlDiv;
     2965  else         r->cfDiv   = nlIntDiv;
    29522966  r->cfIntDiv= nlIntDiv;
    29532967  r->cfIntMod= nlIntMod;
  • libpolys/polys/kbuckets.cc

    rb743d9 r2d3e75  
    840840      if (!(n_IsOne(gcd,r)))
    841841      {
    842         number orig_coef2=n_IntDiv(orig_coef,gcd,r);
    843         number add_coef2=n_IntDiv(add_coef, gcd,r);
     842        number orig_coef2=n_ExactDiv(orig_coef,gcd,r);
     843        number add_coef2=n_ExactDiv(add_coef, gcd,r);
    844844        n_Delete(&orig_coef,r);
    845845        n_Delete(&add_coef,r);
     
    917917      if (!(n_IsOne(gcd,r)))
    918918      {
    919         number orig_coef2=n_IntDiv(orig_coef,gcd,r);
    920         number add_coef2=n_IntDiv(add_coef, gcd,r);
     919        number orig_coef2=n_ExactDiv(orig_coef,gcd,r);
     920        number add_coef2=n_ExactDiv(add_coef, gcd,r);
    921921        n_Delete(&orig_coef,r);
    922922        n_Delete(&n,r);
     
    12491249      assume(bucket->coef[i]!=NULL);
    12501250      number lc=p_GetCoeff(bucket->coef[i],r);
    1251       p_SetCoeff(bucket->coef[i], n_IntDiv(lc,coef,r),r);
     1251      p_SetCoeff(bucket->coef[i], n_ExactDiv(lc,coef,r),r);
    12521252      assume(!(n_IsZero(p_GetCoeff(bucket->coef[i],r),r)));
    12531253    }
     
    13231323  else
    13241324  {
    1325     an = n_IntDiv(an, cn, r);
    1326     bn = n_IntDiv(bn, cn, r);
     1325    an = n_ExactDiv(an, cn, r);
     1326    bn = n_ExactDiv(bn, cn, r);
    13271327  }
    13281328  n_Delete(&cn, r);
  • libpolys/polys/monomials/p_polys.cc

    rb743d9 r2d3e75  
    20022002      n_Delete(&x,r->cf);
    20032003      x = n_Init(e,r->cf);
    2004       bin[e] = n_IntDiv(y,x,r->cf);
     2004      bin[e] = n_ExactDiv(y,x,r->cf);
    20052005      n_Delete(&x,r->cf);
    20062006      n_Delete(&y,r->cf);
     
    23022302      {
    23032303        //d = nDiv(pGetCoeff(p),h);
    2304         //tmp = nIntDiv(pGetCoeff(p),h);
     2304        //tmp = nExactDiv(pGetCoeff(p),h);
    23052305        //if (!nEqual(d,tmp))
    23062306        //{
     
    23102310        //}
    23112311        //nDelete(&tmp);
    2312         d = n_IntDiv(pGetCoeff(p),h,r->cf);
     2312        d = n_ExactDiv(pGetCoeff(p),h,r->cf);
    23132313        p_SetCoeff(p,d,r);
    23142314        pIter(p);
     
    24512451  {
    24522452#if 1
    2453     d = nlIntDiv(pGetCoeff(p),h,r->cf);
     2453    d = nlExactDiv(pGetCoeff(p),h,r->cf);
    24542454    p_SetCoeff(p,d,r);
    24552455#else
    2456     nlInpIntDiv(pGetCoeff(p),h,r->cf);
     2456    nlInpExactDiv(pGetCoeff(p),h,r->cf);
    24572457#endif
    24582458    pIter(p);
     
    25952595//      while (p!=NULL)
    25962596//      {
    2597 //        d = nIntDiv(pGetCoeff(p),h);
     2597//        d = nExactDiv(pGetCoeff(p),h);
    25982598//        pSetCoeff(p,d);
    25992599//        pIter(p);
     
    26442644      {
    26452645        //d = nDiv(pGetCoeff(p),h);
    2646         //tmp = nIntDiv(pGetCoeff(p),h);
     2646        //tmp = nExactDiv(pGetCoeff(p),h);
    26472647        //if (!nEqual(d,tmp))
    26482648        //{
     
    26522652        //}
    26532653        //nDelete(&tmp);
    2654         d = n_IntDiv(pGetCoeff(p),h,r->cf);
     2654        d = n_ExactDiv(pGetCoeff(p),h,r->cf);
    26552655        p_SetCoeff(p,d,r->cf);
    26562656        pIter(p);
Note: See TracChangeset for help on using the changeset viewer.