Changeset 4bbc69 in git


Ignore:
Timestamp:
Jul 14, 2014, 1:11:42 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '648d28f488f6ff08f5607ff229b9ad9e4a5b93c2')
Children:
b964fa5d35238deded2896075be285d7005717dd
Parents:
43c97c987f6b22c14b6cb512fcaf3df848b37932
Message:
fix: degree test for subst(ideal/module/matrix...)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r43c97c r4bbc69  
    62936293  BOOLEAN nok=jjSUBST_Test(v,w,ringvar,monomexpr);
    62946294  if (nok) return TRUE;
     6295  ideal id=(ideal)u->Data();
    62956296  if (ringvar>0)
    62966297  {
     6298    BOOLEAN overflow=FALSE;
     6299    //if (monomexpr!=NULL)
     6300    if (0)
     6301    {
     6302      long deg_monexp=pTotaldegree(monomexpr);
     6303      for(int i=IDELEMS(id)-1;i>=0;i--)
     6304      {
     6305        poly p=id->m[i];
     6306        if ((p!=NULL) && (pTotaldegree(p)!=0) &&
     6307        ((unsigned long)deg_monexp > (currRing->bitmask / (unsigned long)pTotaldegree(p))))
     6308        {
     6309          overflow=TRUE;
     6310          break;
     6311        }
     6312      }
     6313    }
     6314    if (overflow)
     6315      Warn("possible OVERFLOW in subst, max exponent is %ld",currRing->bitmask);
    62976316    if ((monomexpr==NULL)||(pNext(monomexpr)==NULL))
    6298       res->data = id_Subst((ideal)u->CopyD(res->rtyp), ringvar, monomexpr, currRing);
     6317    {
     6318      if (res->rtyp==MATRIX_CMD) id=(ideal)mp_Copy((matrix)id,currRing);
     6319      else                       id=id_Copy(id,currRing);
     6320      res->data = id_Subst(id, ringvar, monomexpr, currRing);
     6321    }
    62996322    else
    6300       res->data = idSubstPoly((ideal)u->Data(),ringvar,monomexpr);
     6323      res->data = idSubstPoly(id,ringvar,monomexpr);
    63016324  }
    63026325  else
    63036326  {
    6304     res->data = idSubstPar((ideal)u->Data(),-ringvar,monomexpr);
     6327    res->data = idSubstPar(id,-ringvar,monomexpr);
    63056328  }
    63066329  return FALSE;
Note: See TracChangeset for help on using the changeset viewer.