Changeset 459ec94 in git for libpolys


Ignore:
Timestamp:
Jun 8, 2016, 11:23:17 AM (8 years ago)
Author:
Adi Popescu <adi_popescum@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
7d2b897ca11e37de4604e5ef70fedebde74c5f18
Parents:
042a2446603880e31b20a8b52076d7e9d00046fd
Message:
add: sba gcd-pair replacement while reduction
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/p_polys.h

    r042a24 r459ec94  
    15241524}
    15251525
     1526// The coefficient will be compared in absolute value
     1527static inline int p_LtCmpNoAbs(poly p, poly q, const ring r)
     1528{
     1529  int res = p_LmCmp(p,q,r);
     1530  if(res == 0)
     1531  {
     1532    if(p_GetCoeff(p,r) == NULL || p_GetCoeff(q,r) == NULL)
     1533      return res;
     1534    number pc = p_GetCoeff(p,r);
     1535    number qc = p_GetCoeff(q,r);
     1536    if(n_Greater(pc,qc,r->cf))
     1537      res = 1;
     1538    if(n_Greater(qc,pc,r->cf))
     1539      res = -1;
     1540    if(n_Equal(pc,qc,r->cf))
     1541      res = 0;
     1542  }
     1543  return res;
     1544}
     1545
    15261546#ifdef HAVE_RINGS
    15271547// This is the equivalent of pLmCmp(p,q) != -currRing->OrdSgn for rings
Note: See TracChangeset for help on using the changeset viewer.