Changeset ed95e6 in git for libpolys/polys


Ignore:
Timestamp:
May 2, 2013, 1:24:58 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
2391e43dac272afc25f70e4de19ef94ec0950d2b
Parents:
121d2ae145e99602da1f3d3014e3f2c045d7185a
Message:
chg: sing->factory conversion, allow fractions in Q
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/clapconv.cc

    r121d2ae red95e6  
    319319  {
    320320    n_Normalize(p_GetCoeff(p, r), r->cf);
    321     CanonicalForm term=convSingPFactoryP(NUM(p_GetCoeff(p, r)),r->cf->extRing);
    322 
    323     if ((DEN(p_GetCoeff(p,r))!=NULL)
    324     && (!errorreported))
    325     {
     321
     322    // test if denominator is constant
     323    if (!p_IsConstantPoly(DEN (p_GetCoeff (p,r)),r) && !errorreported)
    326324      WerrorS("conversion error: denominator!= 1");
     325
     326    CanonicalForm term=convSingPFactoryP(NUM (p_GetCoeff(p, r)),r->cf->extRing);
     327
     328    // if denominator is not NULL it should be a constant at this point
     329    if (DEN (p_GetCoeff(p,r)) != NULL)
     330    {
     331      CanonicalForm den= convSingPFactoryP(DEN (p_GetCoeff(p, r)),r->cf->extRing);
     332      if (rChar (r) == 0)
     333        On (SW_RATIONAL);
     334      term /= den;
    327335    }
    328336
Note: See TracChangeset for help on using the changeset viewer.