-
Notifications
You must be signed in to change notification settings - Fork 162
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
kernel: fix bug in LtTrans24 in trans.c #1130
Conversation
Won't it make code less efficient if If you don't want to force all trans under degree 65,536 to be |
Codecov Report
@@ Coverage Diff @@
## master #1130 +/- ##
==========================================
+ Coverage 59.19% 59.24% +0.04%
==========================================
Files 434 434
Lines 231093 231096 +3
==========================================
+ Hits 136806 136908 +102
+ Misses 94287 94188 -99
Continue to review full report at Codecov.
|
@ChrisJefferson I don't see how this could have any effect on performance. The performance of most (all?) of the functions in I might be overlooking something, can you point me to an example in the code of what you were thinking of? I like the idea of having a function that converts from |
This bug is causing me some headaches, and I would appreciate seeing a fix merged. |
I'm worried by the tests, as far as I can tell the only transformation we ever test with is the identity transformation -- it would be easy for there to be a bug where the identity transformation worked, but almost anything else didn't. |
@ChrisJefferson if you look at the tests, you'll see that they do not only test that things work for the identity transformation. Having Previously none of the blocks of code for transformations of type |
@ChrisJefferson would you prefer if I removed the tests and the change of |
You could just introduce a separate object for the purposes of testing the |
When you say multiplying anything by the identity transformation gives a TRANS_4 now, that seems like an example of inefficiency caused by this patch :) However, for the purposes of getting this committed in, how about adding an explicit new global ID_TRANS_4 (not fixed on the name), which is an identity transformation on TRANS_4, then you can use that in tests and not effect the built-in identity transformation? |
@ChrisJefferson @markuspf Yes, I see what you mean, I will introduce |
This commit fixes a bug in LtTrans24, a for loop was incorrectly nested. In order to increase the test coverage to include this part of the code (and a number of other parts of the code in trans.c that were previously unreachable) IdentityTrans is altered to be a T_TRANS4. Tests are added for this part of the code, and the other previously unreachable parts.
5be5f2a
to
f8c4f0c
Compare
@ChrisJefferson @markuspf I've made the suggested changes, should be good to go. |
Lets wait for the tests to go through and then we're good to go. |
I'm happy with this now. |
Please make sure that this pull request:
Tick all what applies to this pull request
Write below the description of changes (for the release notes)
This PR fixes a bug in
LtTrans24
, a for loop was incorrectly nested.In order to increase the test coverage to include this part of the code
(and a number of other parts of the code in
trans.c
that were previouslyunreachable)
IdentityTrans
is altered to be aT_TRANS4
. Tests are addedfor this part of the code, and the other previously unreachable parts.
This resolves Semigroups Issue 251.