Skip to content

Commit

Permalink
Carry changes through to HPCGAP
Browse files Browse the repository at this point in the history
  • Loading branch information
hulpke committed Jan 23, 2019
1 parent 6fb229f commit 4210bab
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions hpcgap/lib/polyrat.gi
Original file line number Diff line number Diff line change
Expand Up @@ -775,13 +775,17 @@ local brci,gcd,fam,fc,gc;
if gcd=fail then
# fall back to the original version:
gcd:=RPIGcd(f,g);
if Length(gcd)>0 and not IsOne(gcd[1]) then gcd:=gcd/gcd[1];fi;
if Length(gcd)>0 and not IsOne(gcd[Length(gcd)]) then
gcd:=gcd/gcd[Length(gcd)];
fi;
return gcd;

fi;
fc:=Minimum(fc[2],gc[2]);
fc:=fc+RemoveOuterCoeffs(gcd,fam!.zeroCoefficient);
if Length(gcd)>0 and not IsOne(gcd[1]) then gcd:=gcd/gcd[1];fi;
if Length(gcd)>0 and not IsOne(gcd[Length(gcd)]) then
gcd:=gcd/gcd[Length(gcd)];
fi;
return LaurentPolynomialByExtRepNC(fam,gcd,fc,brci);
end);

Expand Down Expand Up @@ -1859,7 +1863,7 @@ local fc,ind, v, g, q, s, r, x,shift;
Append(s,List([1..v],f->x));
Sort(s);

if not IsBound(opt.stopdegs) and Sum(s,DegreeOfLaurentPolynomial)<>DegreeOfLaurentPolynomial(f)+v then
if not (IsBound(opt.stopdegs) or IsBound(opt.onlydegs)) and Sum(s,DegreeOfLaurentPolynomial)<>DegreeOfLaurentPolynomial(f)+v then
Error("degree discrepancy!");
fi;

Expand Down

0 comments on commit 4210bab

Please sign in to comment.