Remainder check adjusted to PrimesGenerator.
This commit is contained in:
1 parent
6a4ee0e2c5
commit
6dc26336c6
1 file changed
+2
-2
@@ -212,12 +212,12 @@ public sealed class MersenneNumberDivisorByDivisorCpuTester : IMersenneNumberDiv
|
|||||||
|
|
||||||
bool admissible = lastIsSeven
|
bool admissible = lastIsSeven
|
||||||
? (remainder10 == 3 || remainder10 == 7 || remainder10 == 9)
|
? (remainder10 == 3 || remainder10 == 7 || remainder10 == 9)
|
||||||
: (remainder10 == 1 || remainder10 == 3 || remainder10 == 7 || remainder10 == 9);
|
: (remainder10 == 1 || remainder10 == 3 || remainder10 == 9);
|
||||||
|
|
||||||
if (admissible && (remainder8 == 1 || remainder8 == 7) && remainder3 != 0 && remainder5 != 0)
|
if (admissible && (remainder8 == 1 || remainder8 == 7) && remainder3 != 0 && remainder5 != 0)
|
||||||
{
|
{
|
||||||
MontgomeryDivisorData divisorData = MontgomeryDivisorDataCache.Get(candidate);
|
MontgomeryDivisorData divisorData = MontgomeryDivisorDataCache.Get(candidate);
|
||||||
ulong divisorCycle = 0UL;
|
ulong divisorCycle;
|
||||||
|
|
||||||
if (candidate <= PerfectNumberConstants.MaxQForDivisorCycles)
|
if (candidate <= PerfectNumberConstants.MaxQForDivisorCycles)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user