java-math-library
java-math-library copied to clipboard
Prohibit bad sieve / trial divison combinations
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
-
Sieve03gwithTDiv_QS_2LP_Full, or -
Sieve03hwithTDiv_QS_2LP.