Skip to content

AddToIgs improvements 6: cache small negative powers - #277

Merged
fingolfin merged 2 commits into
gap-packages:masterfrom
stertooy:igs-improv-6
Oct 25, 2026
Merged

fingolfin merged 2 commits into
gap-packages:masterfrom
stertooy:igs-improv-6

Conversation

@stertooy

@stertooy stertooy commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Extracted from #174.

This caches small negative powers of elements of the currently computed igs.

I added some (small?) improvement of my own:

  • Previously, when computing ind[d]^-q, this only tried to either get this exact value from the cache, or get ind[d]^-1 from the cache and then compute (ind[d]^-1)^q. I made it so this also tries to find some ind[d]^-s from the cache and then compute (ind[d]^-s)^(q/s) (where of course s divides q).
  • This function was not used in the "add powers and commutators" parts and in the "ReduceExpo" functions... Meaning it often would not draw a known value from the cache we created.
  • Use Unbind instead of setting things to [].

Original PR disclaimer:
Assisted-by: Claude Code (Fable 5.1)

@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.61%. Comparing base (7e84dbe) to head (b77a4ca).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #277      +/-   ##
==========================================
+ Coverage   71.51%   71.61%   +0.10%     
==========================================
  Files          88       88              
  Lines       13029    13076      +47     
==========================================
+ Hits         9318     9365      +47     
  Misses       3711     3711              
Files with missing lines Coverage Δ
gap/basic/pcppara.gi 93.80% <100.00%> (+0.46%) ⬆️
gap/basic/pcppcps.gi 84.95% <100.00%> (+0.76%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stertooy
stertooy marked this pull request as draft October 22, 2026 11:35
@stertooy
stertooy marked this pull request as ready for review October 22, 2026 15:24
@stertooy

Copy link
Copy Markdown
Collaborator Author

Oh, also, if #284 gets merged first, this PR would benefit from a small change: the "reuse a cached power ... " strategy should be avoided if g is a power of a generator, because such powers are computed much faster due to #284.

@fingolfin
fingolfin merged commit 4798827 into gap-packages:master Oct 25, 2026
5 checks passed
@stertooy
stertooy deleted the igs-improv-6 branch October 27, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants