java-math-library icon indicating copy to clipboard operation
java-math-library copied to clipboard

Prohibit bad sieve / trial divison combinations

Open TilmanNeumann opened this issue 5 months ago • 0 comments

Currently it is possible to create subclasses of PSIQSThread that combine sieve and trial divsion classes that would work together very slowly.

For example, using Sieve03g with TDiv_QS_2LP in class PSIQSThread would be very bad because the trial division class expects that small factors have already been resolved; but the sieve class does not do that. The combination still works but very slowly.

This should be prohibited by software design (or at least by runtime checks)

Sidenote: The correct thing would be to combine

  • Sieve03g with TDiv_QS_2LP_Full, or
  • Sieve03h with TDiv_QS_2LP.

TilmanNeumann avatar Aug 31 '25 18:08 TilmanNeumann