Changeset f2b6f0b in git


Ignore:
Timestamp:
Mar 11, 2011, 4:44:00 PM (13 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '0bc2210f8055033868008a3836878db65ec6f89e')
Children:
526c7a0339cc1389327b6890ee660bf4e305a2bd
Parents:
55b168742289691f8d1b35cb10dd7eae24b73c9d
Message:
fix for tr 260

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

Legend:

Unmodified
Added
Removed
  • kernel/clapconv.cc

    r55b1687 rf2b6f0b  
    4545  CanonicalForm term;
    4646  /* does only work for Zp, Q */
    47   if ( getCharacteristic() != 0 )
    48   {
    49     term = npInt( n,r );
    50   }
    51   else
     47  if ((r==NULL) || rField_is_Q(r))
    5248  {
    5349    if ( SR_HDL(n) & SR_INT )
     
    7470    }
    7571  }
     72  else /*if ( (r!=NULL) && rField_is_Zp(r) ) */
     73  {
     74    term = npInt( n,r );
     75  }
    7676  return term;
    7777}
    7878
    79 number convFactoryNSingN( const CanonicalForm & n)
     79number convFactoryNSingN( const CanonicalForm & n, const ring r)
    8080{
    8181  if (n.isImm())
    82     return nInit(n.intval());
     82  {
     83    if (r==NULL) return nlInit(n.intval(),NULL);
     84    else         return n_Init(n.intval(),r);
     85  }
    8386  else
    8487  {
     
    99102  }
    100103}
     104
     105//number convFactoryNSingN( const CanonicalForm & n)
     106//{
     107//  return convFactoryNSingN(n,currRing);
     108//}
     109
    101110
    102111poly convFactoryPSingP ( const CanonicalForm & f, const ring r )
     
    482491  for(i=rl-1;i>=0;i--)
    483492  {
    484     X[i]=convSingNFactoryN(x[i],currRing); // may be larger MAX_INT
    485     Q[i]=convSingNFactoryN(q[i],currRing); // may be larger MAX_INT
     493    X[i]=convSingNFactoryN(x[i],NULL); // may be larger MAX_INT
     494    Q[i]=convSingNFactoryN(q[i],NULL); // may be larger MAX_INT
    486495  }
    487496  CanonicalForm xnew,qnew;
    488497  chineseRemainder(X,Q,xnew,qnew);
    489   number n=convFactoryNSingN(xnew);
    490   number p=convFactoryNSingN(qnew);
    491   number p2=nlIntDiv(p,nlInit(2, currRing));
     498  number n=convFactoryNSingN(xnew,NULL);
     499  number p=convFactoryNSingN(qnew,NULL);
     500  number p2=nlIntDiv(p,nlInit(2, NULL));
    492501  if (nlGreater(n,p2))
    493502  {
    494503     number n2=nlSub(n,p);
    495      nlDelete(&n,currRing);
     504     nlDelete(&n,NULL);
    496505     n=n2;
    497506  }
    498   nlDelete(&p,currRing);
    499   nlDelete(&p2,currRing);
     507  nlDelete(&p,NULL);
     508  nlDelete(&p2,NULL);
    500509  return n;
    501510#else
  • kernel/clapconv.h

    r55b1687 rf2b6f0b  
    3636
    3737CanonicalForm convSingNFactoryN( number n, const ring r );
    38 number convFactoryNSingN( const CanonicalForm & n);
     38number convFactoryNSingN( const CanonicalForm & n, const ring r);
    3939
    4040
Note: See TracChangeset for help on using the changeset viewer.