Changeset a725dae in git for kernel/kutil.cc
- Timestamp:
- Jan 22, 2006, 5:29:37 AM (18 years ago)
- Branches:
- (u'spielwiese', 'ec94ef7a30b928574c0c3daf41f6804dff5f6b69')
- Children:
- 76a71142ba90e62cb5e72eedf1029c5f98235e46
- Parents:
- 7f06ccaffa6e5a520078549a3e37d7d51d338274
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/kutil.cc
r7f06cca ra725dae 2 2 * Computer Algebra System SINGULAR * 3 3 ****************************************/ 4 /* $Id: kutil.cc,v 1.1 5 2006-01-20 01:15:07 wienand Exp $ */4 /* $Id: kutil.cc,v 1.16 2006-01-22 04:29:37 wienand Exp $ */ 5 5 /* 6 6 * ABSTRACT: kernel: utils for kStd … … 1005 1005 pLcm(p,strat->S[i],Lp.lcm); 1006 1006 pSetm(Lp.lcm); 1007 #ifdef HAVE_RING2TOM 1007 #ifdef HAVE_RING2TOM_DEACT 1008 1008 if (strat->sugarCrit && currRing->cring == 0) 1009 1009 #else … … 1079 1079 else /*sugarcrit*/ 1080 1080 { 1081 #ifdef HAVE_RING2TOM 1081 #ifdef HAVE_RING2TOM_DEACT 1082 1082 if (currRing->cring == 0) { 1083 1083 #endif … … 1144 1144 } 1145 1145 #endif 1146 #ifdef HAVE_RING2TOM 1146 #ifdef HAVE_RING2TOM_DEACT 1147 1147 } 1148 1148 #endif … … 1595 1595 } 1596 1596 1597 long twoPow(long arg) { 1598 long t = arg; 1599 long result = 1; 1600 while (t > 0) { 1601 result = 2 * result; 1602 t--; 1603 } 1604 return result; 1605 } 1606 1597 1607 /*2 1598 1608 *(s[0],h),...,(s[k],h) will be put to the pairset L(via initenterpairs) … … 1601 1611 void enterpairs (poly h,int k,int ecart,int pos,kStrategy strat, int atR) 1602 1612 { 1613 #ifdef HAVE_RING2TOM 1614 // enter also zero divisor * poly, if this is non zero and of smaller degree 1615 if (currRing->cring == 1) 1616 { 1617 if (((long) ((h)->coef)) % 2 == 0) 1618 { 1619 long a = ((long) ((h)->coef)) / 2; 1620 long b = currRing->ch - 1; 1621 poly p = p_Copy(h->next, strat->tailRing); 1622 while (a % 2 == 0) 1623 { 1624 a = a / 2; 1625 b--; 1626 } 1627 p = p_Mult_nn(p, (number) twoPow(b), strat->tailRing); 1628 1629 if (p != NULL) 1630 { 1631 if (TEST_OPT_PROT) 1632 { 1633 PrintS("Z"); 1634 } 1635 poly tmp = p_ISet((long) ((p)->coef), currRing); 1636 for (int i = 1; i <= currRing->N; i++) { 1637 pSetExp(tmp, i, p_GetExp(p, i, strat->tailRing)); 1638 } 1639 p_Setm(tmp, currRing); 1640 p = p_LmDeleteAndNext(p, strat->tailRing); 1641 pNext(tmp) = p; 1642 1643 LObject h; 1644 h.p = tmp; 1645 h.tailRing = strat->tailRing; 1646 if (TEST_OPT_INTSTRATEGY) 1647 { 1648 //pContent(h.p); 1649 h.pCleardenom(); // also does a pContent 1650 } 1651 else 1652 { 1653 h.pNorm(); 1654 } 1655 strat->initEcart(&h); 1656 int posx; 1657 if (h.p!=NULL) 1658 { 1659 if (strat->Ll==-1) 1660 posx =0; 1661 else 1662 posx = strat->posInL(strat->L,strat->Ll,&h,strat); 1663 h.sev = pGetShortExpVector(h.p); 1664 h.t_p = k_LmInit_currRing_2_tailRing(h.p, strat->tailRing); 1665 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,posx); 1666 } 1667 } 1668 } 1669 } 1670 #endif 1603 1671 int j=pos; 1604 1672 … … 3278 3346 pos =0; 3279 3347 else 3280 3348 pos = strat->posInL(strat->L,strat->Ll,&h,strat); 3281 3349 h.sev = pGetShortExpVector(h.p); 3282 3350 enterL(&strat->L,&strat->Ll,&strat->Lmax,h,pos);
Note: See TracChangeset
for help on using the changeset viewer.