Changeset a73dde7 in git for Singular/iparith.cc
- Timestamp:
- Aug 18, 2005, 4:48:58 PM (19 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
- Children:
- 22ab348b171cd2e05a1a277f094ff0fd5c4eabcc
- Parents:
- be495e3e244c70b1d4938cedaf11b5d3dc25711c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/iparith.cc
rbe495e ra73dde7 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: iparith.cc,v 1.37 2 2005-07-27 15:47:55Singular Exp $ */4 /* $Id: iparith.cc,v 1.373 2005-08-18 14:48:58 Singular Exp $ */ 5 5 6 6 /* … … 448 448 return FALSE; 449 449 } 450 static void jjEQUAL_REST(leftv res,leftv u,leftv v) 451 { 452 if ((res->data) && (u->next!=NULL) && (v->next!=NULL)) 453 { 454 int save_iiOp=iiOp; 455 if (iiOp==NOTEQUAL) 456 iiExprArith2(res,u->next,EQUAL_EQUAL,v->next); 457 else 458 iiExprArith2(res,u->next,iiOp,v->next); 459 iiOp=save_iiOp; 460 } 461 if (iiOp==NOTEQUAL) res->data=(char *)(!(long)res->data); 462 } 450 static void jjEQUAL_REST(leftv res,leftv u,leftv v); 463 451 static BOOLEAN jjCOMPARE_IV(leftv res, leftv u, leftv v) 464 452 { … … 821 809 } 822 810 return jjPLUSMINUS_Gen(res,u,v); 811 return FALSE; 823 812 } 824 813 static BOOLEAN jjPLUS_MA(leftv res, leftv u, leftv v) … … 903 892 } 904 893 return jjPLUSMINUS_Gen(res,u,v); 894 return FALSE; 905 895 } 906 896 static BOOLEAN jjTIMES_I(leftv res, leftv u, leftv v) … … 1244 1234 jjEQUAL_REST(res,u,v); 1245 1235 return FALSE; 1236 } 1237 static void jjEQUAL_REST(leftv res,leftv u,leftv v) 1238 { 1239 if ((res->data) && (u->next!=NULL) && (v->next!=NULL)) 1240 { 1241 int save_iiOp=iiOp; 1242 if (iiOp==NOTEQUAL) 1243 iiExprArith2(res,u->next,EQUAL_EQUAL,v->next); 1244 else 1245 iiExprArith2(res,u->next,iiOp,v->next); 1246 iiOp=save_iiOp; 1247 } 1248 if (iiOp==NOTEQUAL) res->data=(char *)(!(long)res->data); 1246 1249 } 1247 1250 static BOOLEAN jjAND_I(leftv res, leftv u, leftv v) … … 1417 1420 return FALSE; 1418 1421 } 1422 static BOOLEAN jjKLAMMER_rest(leftv res, leftv u, leftv v); 1419 1423 static BOOLEAN jjKLAMMER(leftv res, leftv u, leftv v) 1420 1424 { … … 1427 1431 omFree((ADDRESS)nn); 1428 1432 syMake(res,n); 1433 if (u->next!=NULL) return jjKLAMMER_rest(res,u->next,v); 1429 1434 return FALSE; 1430 1435 } … … 1454 1459 u->name = NULL; 1455 1460 omFreeSize(n, slen); 1461 if (u->next!=NULL) return jjKLAMMER_rest(res,u->next,v); 1462 return FALSE; 1463 } 1464 static BOOLEAN jjKLAMMER_rest(leftv res, leftv u, leftv v) 1465 { 1466 leftv tmp=(leftv)omAllocBin(sleftv_bin); 1467 memset(tmp,0,sizeof(sleftv)); 1468 BOOLEAN b; 1469 if (v->Typ()==INTVEC_CMD) 1470 b=jjKLAMMER_IV(tmp,u,v); 1471 else 1472 b=jjKLAMMER(tmp,u,v); 1473 if (b) 1474 { 1475 omFreeBin(tmp,sleftv_bin); 1476 return TRUE; 1477 } 1478 leftv h=res; 1479 while (h->next!=NULL) h=h->next; 1480 h->next=tmp; 1456 1481 return FALSE; 1457 1482 } … … 3710 3735 intvec *w=(intvec *)atGet(v,"isHomog",INTVEC_CMD); 3711 3736 ideal v_id=(ideal)v->Data(); 3712 if (w!=NULL) 3737 if (w!=NULL) 3713 3738 { 3714 3739 w=ivCopy(w);
Note: See TracChangeset
for help on using the changeset viewer.