Skip to content

Commit

Permalink
Do not use vectorObj for polynomial coeffients
Browse files Browse the repository at this point in the history
The compact form does not help and cause problems.
  • Loading branch information
hulpke committed Feb 25, 2022
1 parent 76564e1 commit d26e555
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/polyfinf.gi
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ local br, ind, c, facs, deg, px, pow, cyc, gcd,d,powc,fc,fam;
#px := LaurentPolynomialByExtRepNC(
# FamilyObj(f), [One(br)],1, ind );
# pow := px;
px:=ImmutableVector(br, [Zero(br),-One(br)]);
if IsFinite(br) and IsField(br) and Size(br)>MAXSIZE_GF_INTERNAL then
px:=Immutable([Zero(br),-One(br)]);
else
px:=ImmutableVector(br, [Zero(br),-One(br)]);
fi;
powc:=-px;
fc:=CoefficientsOfLaurentPolynomial(f)[1];
fam:=FamilyObj(One(br));
Expand Down
8 changes: 7 additions & 1 deletion lib/ratfun1.gi
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ local f,typ,lc;

# slightly better to do this after the Length has been determined
if IsFFECollection(coeff) and IS_PLIST_REP(coeff) then
coeff := ImmutableVector(DefaultRing(coeff), coeff);
f:=DefaultRing(coeff);
if IsFinite(f) and Size(f)>MAXSIZE_GF_INTERNAL then
# do not pack Zmodnz objects into vectors
coeff := Immutable(coeff);
else
coeff := ImmutableVector(f, coeff);
fi;
fi;


Expand Down

0 comments on commit d26e555

Please sign in to comment.