Skip to content

Commit

Permalink
- Fixed a bug in the Hensel lifting routine having to do with corruption
Browse files Browse the repository at this point in the history
  of the leading coefficients. They have to be fixed every iteration
  during the multivariate lifting
- Changed the maximum degree of the Hensel lifting (I don't know why it
  was +1)
  • Loading branch information
benruijl committed Jul 16, 2015
1 parent 6f3dd34 commit 6f06e94
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sources/polyfact.cc
Original file line number Diff line number Diff line change
Expand Up @@ -667,10 +667,13 @@ const vector<poly> polyfact::lift_variables (const poly &A, const vector<poly> &
// Calculate the maximum degree of A in x2,...,xm
int maxdegA=0;
for (int i=1; i<(int)x.size(); i++)
maxdegA = MaX(maxdegA, 1+A.degree(x[i]));
maxdegA = MaX(maxdegA, A.degree(x[i]));

// Iteratively add the variables x2,...,xm
for (int xi=1; xi<(int)x.size(); xi++) {
// replace the current leading coefficients by the correct ones
for (int i=0; i<(int)a.size(); i++)
a[i] += (lc[i] - a[i].lcoeff_univar(x[0])) * poly::simple_poly(BHEAD x[0],0,a[i].degree(x[0]));

vector<poly> anew(a);
for (int i=0; i<(int)anew.size(); i++)
Expand Down

0 comments on commit 6f06e94

Please sign in to comment.