Skip to content

Commit

Permalink
FIX: Printing of assoc. words if there are iterated powers (#3847)
Browse files Browse the repository at this point in the history
* FIX: Printing of assoc. words if there are iterated powers

Re-indexing with temporary letters went wrong if there were already powers
stored.

close #3845
  • Loading branch information
hulpke authored Jan 14, 2020
1 parent 965b1c6 commit b877da9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/wordrep.gi
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ local a,n,t,
or (IsInt(PRINTWORDPOWERS) and Length(l)<PRINTWORDPOWERS)) and
ValueOption("printnopowers")<>true then
if Length(l)>0 and n=infinity then
n:=2*(AbsInt(Maximum(l))+1);
n:=2*(Maximum(List(l,AbsInt))+1);
fi;
a:=FindSubstringPowers(l,n);
a:=FindSubstringPowers(l,n+Length(tseed)); # tseed numbers are used already
else
a:=[l,[]];
fi;
Expand Down
4 changes: 4 additions & 0 deletions tst/testbugfix/2020-01-13-wordprint.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Assoc. word printing, #3845
gap> f:=FreeGroup("x","y");;x:=f.1;;y:=f.2;;
gap> y^4*(y^2*(y*x)^2)^2*y^-7*x*y^16;
y^4*(y^2*(y*x)^2)^2*y^-7*x*y^16

0 comments on commit b877da9

Please sign in to comment.