Removed useless debug logs
This commit is contained in:
@@ -86,10 +86,8 @@ public abstract class PrimeCalculator {
|
|||||||
long end = start + BLOCK_MAX;
|
long end = start + BLOCK_MAX;
|
||||||
long endSqrt = (long) Math.sqrt(end) + 1;
|
long endSqrt = (long) Math.sqrt(end) + 1;
|
||||||
|
|
||||||
System.out.println(number);
|
|
||||||
|
|
||||||
byte block = 0;
|
byte block = 0;
|
||||||
int p = 2;
|
int p = 3;
|
||||||
while (p < endSqrt) {
|
while (p < endSqrt) {
|
||||||
p = nextPrime(p);
|
p = nextPrime(p);
|
||||||
|
|
||||||
@@ -104,9 +102,6 @@ public abstract class PrimeCalculator {
|
|||||||
}
|
}
|
||||||
byte mask = (byte) (1 << ((number >> 1) & 7));
|
byte mask = (byte) (1 << ((number >> 1) & 7));
|
||||||
|
|
||||||
System.out.println(byteToBinary(block));
|
|
||||||
System.out.println(byteToBinary(mask));
|
|
||||||
|
|
||||||
return !((block & mask) != 0);
|
return !((block & mask) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -131,8 +126,4 @@ public abstract class PrimeCalculator {
|
|||||||
return isPrimeByBlock(number);
|
return isPrimeByBlock(number);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String byteToBinary(byte b) {
|
|
||||||
return String.format("%8s", Integer.toBinaryString(b & 0xFF)).replace(' ', '0');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user