Changeset 5f4ae4 in git


Ignore:
Timestamp:
Mar 19, 2010, 5:08:52 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'b52fc4b2495505785981d640dcf7eb3e456778ef')
Children:
9a446f3ff706d80192fdd4fc1ba9113dce4eb47d
Parents:
520b582c51f3cae10134ddd12d0c4fe689a4e912
Message:
sca-std

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

Legend:

Unmodified
Added
Removed
  • kernel/gring.cc

    r520b58 r5f4ae4  
    19641964  assume(pp!=NULL);
    19651965  pDelete(&m);
    1966   number n=nCopy(pGetCoeff(pp));
     1966  number n=pGetCoeff(pp);
    19671967  number nn;
    19681968  if (!n_IsMOne(n,currRing))
    19691969  {
    19701970    nn=nNeg(nInvers(n));
    1971   }
    1972   else nn=nInit(1);
    1973   nDelete(&n);
    1974   n=nMult(nn,pGetCoeff(kBucketGetLm(b)));
    1975   nDelete(&nn);
    1976   pp=p_Mult_nn(pp,n,currRing);
    1977   nDelete(&n);
     1971    n=nMult(nn,pGetCoeff(kBucketGetLm(b)));
     1972    nDelete(&nn);
     1973    pp=p_Mult_nn(pp,n,currRing);
     1974    nDelete(&n);
     1975  }
     1976  else
     1977  {
     1978    pp=p_Mult_nn(pp,pGetCoeff(kBucketGetLm(b)),currRing);
     1979  }
    19781980  int l=pLength(pp);
    19791981  kBucket_Add_q(b,pp,&l);
     
    21302132  // b will not by multiplied by any constant in this impl.
    21312133  // ==> *c=1
    2132   *c=nInit(1);
     2134  if (c!=NULL) *c=nInit(1);
    21332135  poly m=pOne();
    21342136  pExpVectorDiff(m,pHead(b),p);
     
    21412143
    21422144  pDelete(&m);
    2143   number n=nCopy(pGetCoeff(pp));
    2144   number MinusOne=nInit(-1);
     2145  number n=pGetCoeff(pp);
    21452146  number nn;
    2146   if (!nEqual(n,MinusOne))
     2147  if (!nIsMOne(n))
    21472148  {
    21482149    nn=nNeg(nInvers(n));
    2149   }
    2150   else nn=nInit(1);
    2151   nDelete(&n);
    2152   n=nMult(nn,pGetCoeff(b));
    2153   nDelete(&nn);
    2154   pp=p_Mult_nn(pp,n,currRing);
    2155   nDelete(&n);
    2156   nDelete(&MinusOne);
     2150    n=nMult(nn,pGetCoeff(b));
     2151    nDelete(&nn);
     2152    pp=p_Mult_nn(pp,n,currRing);
     2153    nDelete(&n);
     2154  }
     2155  else
     2156  {
     2157    pp=p_Mult_nn(pp,pGetCoeff(b),currRing);
     2158  }
    21572159  b=p_Add_q(b,pp,currRing);
    21582160}
     
    22432245  if (!n_IsMOne(n, currRing)) // TODO: as above.
    22442246  {
    2245     nn=nNeg(nInvers(nCopy(n)));
    2246   }
    2247   else nn=nInit(1);
    2248 
    2249   number t = nMult(nn, pGetCoeff(b));
    2250   nDelete(&nn);
    2251 
    2252   pp=p_Mult_nn(pp, t, currRing);
    2253   nDelete(&t);
     2247    nn=nNeg(nInvers(n));
     2248    number t = nMult(nn, pGetCoeff(b));
     2249    nDelete(&nn);
     2250    pp=p_Mult_nn(pp, t, currRing);
     2251    nDelete(&t);
     2252  }
     2253  else
     2254  {
     2255    pp=p_Mult_nn(pp, pGetCoeff(b), currRing);
     2256  }
     2257
    22542258
    22552259  b=p_Add_q(b,pp,currRing);
  • kernel/longrat.cc

    r520b58 r5f4ae4  
    10951095  nlTest(a);
    10961096#endif
    1097   if (SR_HDL(a) & SR_INT) return (a==INT_TO_SR(-1));
    1098   return FALSE;
     1097  //if (SR_HDL(a) & SR_INT) return (a==INT_TO_SR(-1));
     1098  //return FALSE;
     1099  return  ((SR_HDL(a) & SR_INT) && (a==INT_TO_SR(-1)));
    10991100}
    11001101
Note: See TracChangeset for help on using the changeset viewer.