Changeset 773d28 in git


Ignore:
Timestamp:
Jun 6, 2012, 3:41:23 PM (11 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '2234726c50d679d6664181a5c72f75a6fd64a787')
Children:
617dbcd561feba2c98f750ce8bd841e28e8da4d4
Parents:
ec664a2ce7842d3b8f5d7a9af2a8b2ff7944ec43
git-author:
Martin Lee <martinlee84@web.de>2012-06-06 15:41:23+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-07-31 11:48:23+02:00
Message:
fix: bug in factor recombination if extension is needed
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/facFqBivar.cc

    rec664a2 r773d28  
    13331333  if (factors.length() == 2)
    13341334  {
    1335     CanonicalForm tmp1, tmp2;
     1335    CanonicalForm tmp1, tmp2, tmp3;
    13361336    tmp1= factors.getFirst();
    13371337    tmp2= factors.getLast();
     
    13421342    tmp2= mod (tmp2, yToL);
    13431343    tmp2 /= content (tmp2, x);
    1344     if (degree (tmp1) + degree (tmp2) == degree (F))
     1344    tmp3 = tmp1*tmp2;
     1345    if (tmp3/Lc (tmp3) == F/Lc (F))
    13451346    {
    13461347      factorsFound++;
     
    14091410  if (factors.length() == 2)
    14101411  {
    1411     CanonicalForm tmp1, tmp2;
     1412    CanonicalForm tmp1, tmp2, tmp3;
    14121413    tmp1= factors.getFirst();
    14131414    tmp2= factors.getLast();
     
    14181419    tmp2= mod (tmp2, yToL);
    14191420    tmp2 /= content (tmp2, x);
    1420     if (degree (tmp1) + degree (tmp2) == degree (F))
     1421    tmp3 = tmp1*tmp2;
     1422    if (tmp3/Lc (tmp3) == F/Lc (F))
    14211423    {
    14221424      factorsFound++;
     
    17231725  if (factors.length() == 2)
    17241726  {
    1725     CanonicalForm tmp1, tmp2;
     1727    CanonicalForm tmp1, tmp2, tmp3;
    17261728    tmp1= factors.getFirst();
    17271729    tmp2= factors.getLast();
     
    17321734    tmp2= mod (tmp2, yToL);
    17331735    tmp2 /= content (tmp2, x);
    1734     if (degree (tmp1) + degree (tmp2) == degree (F))
     1736    tmp3 = tmp1*tmp2;
     1737    if (tmp3/Lc (tmp3) == F/Lc (F))
    17351738    {
    17361739      tmp1= tmp1 (y - evaluation, y);
    17371740      tmp2= tmp2 (y - evaluation, y);
    1738       factorsFound++;
    1739       F= 1;
    1740       tmp1= mapDown (tmp1, info, source, dest);
    1741       tmp2= mapDown (tmp2, info, source, dest);
    1742       reconstructedFactors.append (tmp1);
    1743       reconstructedFactors.append (tmp2);
    1744       return;
     1741      if (!k && beta == x && degree (tmp2, alpha) < 1 &&
     1742          degree (tmp1, alpha) < 1)
     1743      {
     1744        factorsFound++;
     1745        F= 1;
     1746        tmp1= mapDown (tmp1, info, source, dest);
     1747        tmp2= mapDown (tmp2, info, source, dest);
     1748        reconstructedFactors.append (tmp1);
     1749        reconstructedFactors.append (tmp2);
     1750        return;
     1751      }
     1752      else if (!isInExtension (tmp2, gamma, k, delta, source, dest) &&
     1753               !isInExtension (tmp1, gamma, k, delta, source, dest))
     1754      {
     1755        factorsFound++;
     1756        F= 1;
     1757        tmp1= mapDown (tmp1, info, source, dest);
     1758        tmp2= mapDown (tmp2, info, source, dest);
     1759        reconstructedFactors.append (tmp1);
     1760        reconstructedFactors.append (tmp2);
     1761        return;
     1762      }
    17451763    }
    17461764  }
     
    46414659  }
    46424660  Variable y= F.mvar();
    4643   CanonicalForm shiftedF= G (y - evaluation, y);
    4644   int sizeOldF= size (shiftedF);
     4661  int sizeOldF= size (G);
    46454662  if (size (F) < sizeOldF)
    46464663  {
    4647     H= F (y + evaluation, y); //shift back to zero
     4664    H= F;
    46484665    success= true;
    46494666    return earlyFactors;
     
    46894706  CFList smallFactors;
    46904707  CanonicalForm H;
    4691   bool success;
     4708  bool success= false;
    46924709  smallFactors= sieveSmallFactors (F, bufUniFactors, degs, H, diophant, Pi, M,
    46934710                                   success, minBound + 1
     
    53435360  {
    53445361    delete [] bounds;
    5345     return CFList (F);
     5362    CFList source, dest;
     5363    CanonicalForm tmp= G (y - evaluation, y);
     5364    tmp= mapDown (tmp, info, source, dest);
     5365    return CFList (tmp);
    53465366  }
    53475367  int minBound= bounds[0];
     
    53615381  CFList smallFactors;
    53625382  CanonicalForm H;
    5363   bool success;
     5383  bool success= false;
    53645384  smallFactors= extSieveSmallFactors (F, bufUniFactors, degs, H, diophant, Pi,
    53655385                                      M, success, minBound + 1, evaluation, info
Note: See TracChangeset for help on using the changeset viewer.