-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel: fix wrong result bugs in partial perms code
Various computations involving T_PERM2 objects of degree 65536 returned incorrect results. The reason was that the degree, which is always an UInt, was stored in an UInt2. But for degree 65536, this overflows to zero, hence the code effectively treated the permutation as the identity. The fix is to always store the degree as UInt, not as UInt2 or UInt4 (the latter case actually is probably fine, but let's do it right anyway). The fix in PowPPerm2Perm2 is a bit nasty and constitutes a deoptimization; a proper fix at this stage would involve duplicating and tweaking a bunch of code; but I plan to rewrite this file to use C++ templates anyway, at which point the proper fix will come almost for free. So instead of wasting time on a "proper" fix now, let's live with this workaround for now.
- Loading branch information
Showing
2 changed files
with
125 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters