Skip to content

Commit

Permalink
Fix SCRSift handling of large base points
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed May 30, 2016
1 parent b9cd393 commit ac5c474
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/permutat.c
Original file line number Diff line number Diff line change
Expand Up @@ -4823,10 +4823,18 @@ Obj FuncSCR_SIFT_HELPER(Obj self, Obj S, Obj g, Obj n)
Obj orb = ElmPRec(stb,RN_orbit);
Int bpt = INT_INTOBJ(ELM_LIST(orb,1))-1;
Int im;
if (useP2)
im = (Int)ADDR_PERM2(result)[bpt];
else
im = (Int)ADDR_PERM4(result)[bpt];

if (useP2) {
UInt2* ptrResult = ADDR_PERM2(result);
UInt degResult = DEG_PERM2(result);
im = (Int)(IMAGE(bpt, ptrResult, degResult));
}
else {
UInt4* ptrResult = ADDR_PERM4(result);
UInt degResult = DEG_PERM2(result);
im = (Int)(IMAGE(bpt, ptrResult, degResult));
}

if (!(t = ELM0_LIST(trans,im+1)))
break;
else {
Expand Down
5 changes: 5 additions & 0 deletions tst/teststandard/bugfix.tst
Original file line number Diff line number Diff line change
Expand Up @@ -3101,6 +3101,11 @@ gap> Remove(l);
gap> [l, Length(l)];
[ [ 1, 2,, [ ] ], 4 ]

#2016/05/30 (CJ, bug reported github #798)
gap> sc := StabChainOp(Group((1,2)), rec(base := [3,2], reduced := false));;
gap> SCRSift(sc, (1,2));
()

#############################################################################
gap> STOP_TEST( "bugfix.tst", 831990000);

Expand Down

0 comments on commit ac5c474

Please sign in to comment.