Changeset e0af3ef in git


Ignore:
Timestamp:
Jul 18, 2012, 9:44:06 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'spielwiese', 'e7cc1ebecb61be8b9ca6c18016352af89940b21a')
Children:
8a30b16f7366d41b6243988673b9dc25cb0da4a5
Parents:
faa1b8d6e411251ef4c85b56aefa21b74f5db582
git-author:
Martin Lee <martinlee84@web.de>2012-07-18 21:44:06+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-09-04 17:25:37+02:00
Message:
fix: need polys over Z
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/facBivar.cc

    rfaa1b8d re0af3ef  
    645645  }
    646646
     647  A *= bCommonDen (A);
    647648  A= A (y + evaluation, y);
    648649
     
    723724  }
    724725
     726  On (SW_RATIONAL);
     727  A *= bCommonDen (A);
     728  Off (SW_RATIONAL);
     729
    725730  factors= factorRecombination (uniFactors, A, MODl, degs, 1,
    726731                                uniFactors.length()/2, b);
  • factory/facFqBivar.cc

    rfaa1b8d re0af3ef  
    269269    return CFList();
    270270  }
     271  if (F.inCoeffDomain())
     272    return CFList();
    271273
    272274  Variable alpha= info.getAlpha();
     
    478480    return CFList ();
    479481  }
     482  if (F.inCoeffDomain())
     483    return CFList();
    480484  if (degs.getLength() <= 1 || factors.length() == 1)
    481485  {
     
    492496              (mod (b(LC (F, 1)*prodMod (factors, N)),N)/Lc (mod (b(LC (F, 1)*prodMod (factors, N)),N)) == F/Lc(F)));
    493497#endif
     498
    494499  CFList T, S;
    495500
     
    513518  bool recombination= false;
    514519  CanonicalForm test;
    515   bool isRat= (isOn (SW_RATIONAL) && getCharacteristic() == 0) || getCharacteristic() > 0;
     520  bool isRat= (isOn (SW_RATIONAL) && getCharacteristic() == 0) ||
     521               getCharacteristic() > 0;
    516522  if (!isRat)
    517523    On (SW_RATIONAL);
     
    519525  if (!isRat)
    520526    Off (SW_RATIONAL);
    521   buf0= buf(0,x)*LCBuf;
    522527  while (T.length() >= 2*s && s <= thres)
    523528  {
     
    584589            recombination= true;
    585590            result.append (g);
    586             buf= quot;
     591            if (b.getp() != 0)
     592              buf= quot*bCommonDen (quot);
     593            else
     594              buf= quot;
    587595            LCBuf= LC (buf, x);
    588596            T= Difference (T, S);
     
    703711  CanonicalForm buf= F;
    704712  Variable x= Variable (1);
    705   CanonicalForm LCBuf= LC (buf, x);
    706713  CanonicalForm g, quot;
    707714  CanonicalForm M= power (F.mvar(), deg);
     
    711718  if (!isRat)
    712719    On (SW_RATIONAL);
     720  if (b.getp() != 0)
     721    buf *= bCommonDen (buf);
     722  CanonicalForm LCBuf= LC (buf, x);
    713723  CanonicalForm buf0= mulNTL (buf (0,x), LCBuf);
    714724  CanonicalForm buf1= mulNTL (buf (1,x), LCBuf);
     
    746756            reconstructedFactors.append (g);
    747757            factorsFoundIndex[l]= 1;
    748             buf= quot;
     758            if (b.getp() != 0)
     759              buf= quot*bCommonDen(quot);
     760            else
     761              buf= quot;
    749762            d -= degree (g);
    750763            LCBuf= LC (buf, x);
     
    762775            if (bufDegs1.getLength() <= 1)
    763776            {
    764               reconstructedFactors.append (buf);
     777              if (!buf.inCoeffDomain())
     778                reconstructedFactors.append (buf);
    765779              break;
    766780            }
     
    858872          if (bufDegs1.getLength() <= 1)
    859873          {
    860             buf= buf (y - eval, y);
    861             buf /= Lc (buf);
    862             appendMapDown (reconstructedFactors, buf, info, source, dest);
     874            if (!buf.inCoeffDomain())
     875            {
     876              buf= buf (y - eval, y);
     877              buf /= Lc (buf);
     878              appendMapDown (reconstructedFactors, buf, info, source, dest);
     879            }
    863880            break;
    864881          }
Note: See TracChangeset for help on using the changeset viewer.