The tables of factors of b^k +/- 1 that are nowadays maintained by
Jonathan Crombie have grown to 280 MB uncompressed. That is far too much
to distribute with the package, and has blocked a release for years, see
#14.
Store the tables more compactly, dropping line continuations and
whitespace, and restrict the shipped data to those (b,k) with b <= 100,
or b a prime below 1000, or (b,k) already covered by FactInt 1.6.3.
The result is a strict superset of the data shipped in 1.6.3: no base and
no factor is lost, and roughly 670000 further factors are gained. At the
same time tables/brent shrinks from 280.2 MiB to 22.3 MiB, or 9.9 MiB
once the .release script compresses it, which matches the on-disk
footprint of 1.6.3.
Users who need factors beyond this range can still install the full
collection using FetchBrentFactors.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Fixes #14.
The factor tables of
b^k +/- 1nowadays maintained by Jonathan Crombie have grown to 280 MB uncompressed. That is far too much to distribute with the package, and has blocked a release for several years.What this does
Two things:
b^k +/- 1is included ifb <= 100, orbis a prime below 1000, or(b,k)was already covered by the tables in FactInt 1.6.3.The third clause is what makes this safe: the result is a strict superset of the data shipped in 1.6.3. No user loses anything they have today.
Since 23531a13 the
.releasescript compresses these files, so the installed footprint is ~15 MB — the same as 1.6.3 had.Verification
FactInt(1202^60-1)still returns a correct factorization,BRENTFACTORS[1202]simply stays unbound..gzfiles written by the release script are read transparently —Filename,IsReadableFileandReadall fall back to<name>.gz, checked against a live GAP.Not in scope
The download-on-demand tooling discussed in #14 is left for a follow-up, as is documenting
FetchBrentFactorsproperly (it is currently undocumented and hardcodes a dated URL). The manual now describes which subset is shipped and points atFetchBrentFactorsfor the full collection.One observation for that follow-up, from measuring where the bytes actually are: 66% of the full dataset consists of factors with 15 or fewer decimal digits — ones FactInt rediscovers in milliseconds. Dropping those alone would take the complete collection from 280 MiB to 95 MiB, which is a far better lever than restricting bases if we ever want to ship broader coverage.
🤖 Generated with Claude Code