Changeset 1a2d66 in git


Ignore:
Timestamp:
Aug 9, 2012, 2:28:41 PM (10 years ago)
Author:
Martin Lee <martinlee84@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', '96ce329119711a2b80858c8365abd29f8460bbfa')
Children:
6af78bbe6f303e08bbcabe7c7682cc1f4d82755f
Parents:
5295f95d58a904d0546cf79e2609f42619be0635
git-author:
Martin Lee <martinlee84@web.de>2012-08-09 14:28:41+02:00
git-committer:
Martin Lee <martinlee84@web.de>2012-09-04 18:01:17+02:00
Message:
fix: segfault of Hensel lifting in precomputeLeadingCoeff due to gaps between variables
Location:
factory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • factory/facFactorize.cc

    r5295f9 r1a2d66  
    436436
    437437  bufFactors= factors;
     438
     439  CFMap MM, NN;
     440  dummy [0]= sqrfPartF;
     441  dummy [1]= 1;
     442  compress (dummy, MM, NN);
     443  sqrfPartF= MM (sqrfPartF);
     444  CanonicalForm varsSqrfPartF= getVars (sqrfPartF);
     445  for (CFListIterator iter= factors; iter.hasItem(); iter++)
     446    iter.getItem()= MM (iter.getItem());
     447
    438448  CFList evaluation2;
    439   for (int i= 0; i < F.level()-1; i++)
    440     evaluation2.insert (evalPoint[i]);
     449  for (int i= 2; i <= varsSqrfPartF.level(); i++)
     450    evaluation2.insert (evalPoint[NN (Variable (i)).level()-2]);
    441451
    442452  CFList interMedResult;
     
    531541    interMedResult= recoverFactors (oldSqrfPartF, factors);
    532542  }
     543
     544  for (CFListIterator iter= interMedResult; iter.hasItem(); iter++)
     545    iter.getItem()= NN (iter.getItem());
    533546
    534547  CFList result;
  • factory/facFqFactorize.cc

    r5295f9 r1a2d66  
    15921592
    15931593  bufFactors= factors;
     1594
     1595  CFMap MM, NN;
     1596  dummy [0]= sqrfPartF;
     1597  dummy [1]= 1;
     1598  compress (dummy, MM, NN);
     1599  sqrfPartF= MM (sqrfPartF);
     1600  CanonicalForm varsSqrfPartF= getVars (sqrfPartF);
     1601  for (CFListIterator iter= factors; iter.hasItem(); iter++)
     1602    iter.getItem()= MM (iter.getItem());
     1603
    15941604  CFList evaluation2;
    1595   for (int i= 0; i < F.level()-1; i++)
    1596     evaluation2.insert (evalPoint[i]);
     1605  for (int i= 2; i <= varsSqrfPartF.level(); i++)
     1606    evaluation2.insert (evalPoint[NN (Variable (i)).level()-2]);
    15971607
    15981608  CFList interMedResult;
     
    16871697    interMedResult= recoverFactors (oldSqrfPartF, factors);
    16881698  }
     1699
     1700  for (CFListIterator iter= interMedResult; iter.hasItem(); iter++)
     1701    iter.getItem()= NN (iter.getItem());
    16891702
    16901703  CFList result;
Note: See TracChangeset for help on using the changeset viewer.