Changeset d02c1b in git


Ignore:
Timestamp:
Feb 9, 2010, 5:47:59 PM (14 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
a477f80136c773f8acffd73512f53bf88a7c6fe8
Parents:
2769328849b7f094014fdd9f4f080aad9cdd943d
Message:
track 202: check for neg. entries

git-svn-id: file:///usr/local/Singular/svn/trunk@12537 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/iparith.cc

    r276932 rd02c1b  
    26752675  intvec *iv=(intvec *)v->Data();
    26762676  poly p=pOne();
    2677   int i;
     2677  int i,e;
     2678  BOOLEAN err=FALSE;
    26782679  for(i=si_min(pVariables,iv->length()); i>0; i--)
    26792680  {
    2680     pSetExp(p,i,(*iv)[i-1]);
     2681    e=(*iv)[i-1];
     2682    if (e>=0) pSetExp(p,i,e);
     2683    else err=TRUE;
    26812684  }
    26822685  if (iv->length()==(pVariables+1))
    26832686  {
    26842687    res->rtyp=VECTOR_CMD;
    2685     pSetComp(p,(*iv)[pVariables]);
     2688    e=(*iv)[pVariables];
     2689    if (e>=0) pSetComp(p,e);
     2690    else err=TRUE;
    26862691  }
    26872692  pSetm(p);
    26882693  res->data=(char*)p;
    2689   return FALSE;
     2694  if(err) { pDelete(&p); WerrorS("no negative exponent allowed"); }
     2695  return err;
    26902696}
    26912697static BOOLEAN jjPARSTR2(leftv res, leftv u, leftv v)
Note: See TracChangeset for help on using the changeset viewer.