-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Minimal fix for Algebraic Extensions over finite fields of order > 256. #1569
Conversation
Addresses #1561 |
Codecov Report
@@ Coverage Diff @@
## master #1569 +/- ##
==========================================
+ Coverage 63.98% 63.98% +<.01%
==========================================
Files 993 993
Lines 325155 325155
Branches 12995 12995
==========================================
+ Hits 208040 208042 +2
+ Misses 114324 114323 -1
+ Partials 2791 2790 -1
|
Very confused. The new test file runs fine when run using Test from the command-line, but fails when run as part of testbugfix.g or TestDirectory. Revised test file fixes various minor problems but does not seem to resolve this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I run the bugfix test suite in my local GAP. It turns out that what fails is the command FieldByGenerators( GF(2), [ Z(1024) ] );
. I'll track it down further.
tst/testbugfix/2017-08-05-algfld.tst
Outdated
@@ -0,0 +1,14 @@ | |||
# | |||
# Algebraic Extension used to fail for finite fields of size over 256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: "Algebraic Extension" -> "AlgebraicExtension"
tst/testbugfix/2017-08-05-algfld.tst
Outdated
# | ||
# Algebraic Extension used to fail for finite fields of size over 256 | ||
# | ||
gap> algexttest := function(q, i1,i2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpcik: Either remove space after one comma, or add one after the other
tst/testbugfix/2017-08-05-algfld.tst
Outdated
> end;; | ||
gap> algexttest(1009,108,864); # from bug report | ||
gap> algexttest(1024,1023,5); # prime under 256, field size over | ||
gap> algexttest(65537,1,1); # prime over 2^16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: indention of this comment doesn't match the other comments
@@ -105,7 +105,7 @@ local fam,i,cof,red,rchar,impattr,deg; | |||
fam!.deg:=deg; | |||
i:=List([1..DegreeOfLaurentPolynomial(p)],i->fam!.zeroCoefficient); | |||
i[2]:=fam!.oneCoefficient; | |||
i:=ImmutableVector(rchar,i,true); | |||
i:=ImmutableVector(Size(f),i,true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fix looks correct to me.
Nitpick on the commits: The message "Add test for this bug." is not so helpful. I'd either squash the two commits into one, or amend the commit message, say to "Add test for bug in AlgebraicExtension"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also: If you add Fixes #1561
or Resolves #1561
to the commit message (say as its last line), then merging this PR will automatically close #1561.
I'll rebase and tidy once #1573 is merged |
@stevelinton #1573 was merged, you can rebase |
Code really needs rewriting, as does the whole issue of mechanisms to construct/convert a vector in/to the most efficient form. Fixes gap-system#1561
Rebased and addressed nitpicks. Ready to merge as far as I know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, let's see if tests pass now.
Code really needs rewriting, as does the whole issue of mechanisms to
construct/convert a vector in/to the most efficient form.