FindAFactor 3.6.3__tar.gz → 3.6.5__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor/_find_a_factor.cpp +16 -16
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor.egg-info/PKG-INFO +1 -1
- {findafactor-3.6.3 → findafactor-3.6.5}/PKG-INFO +1 -1
- {findafactor-3.6.3 → findafactor-3.6.5}/setup.py +1 -1
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor/__init__.py +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor/dispatchqueue.cpp +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor/find_a_factor.py +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor/oclengine.cpp +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor.egg-info/SOURCES.txt +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor.egg-info/dependency_links.txt +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor.egg-info/requires.txt +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/FindAFactor.egg-info/top_level.txt +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/LICENSE +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/README.md +0 -0
- {findafactor-3.6.3 → findafactor-3.6.5}/setup.cfg +0 -0
@@ -759,7 +759,7 @@ struct Factorizer {
|
|
759
759
|
wheelRadius *= p;
|
760
760
|
sqrPrimes.push_back(p * p);
|
761
761
|
smoothNumberKeys.push_back(p);
|
762
|
-
smoothNumberValues.emplace_back(primes.size(),
|
762
|
+
smoothNumberValues.emplace_back(primes.size(), 0);
|
763
763
|
smoothNumberValues.back()[i] = true;
|
764
764
|
}
|
765
765
|
}
|
@@ -828,29 +828,29 @@ struct Factorizer {
|
|
828
828
|
|
829
829
|
// Compute the prime factorization modulo 2
|
830
830
|
boost::dynamic_bitset<size_t> factorizationVector(BigInteger num) {
|
831
|
-
boost::dynamic_bitset<size_t> vec(primes.size(),
|
832
|
-
|
833
|
-
|
834
|
-
factor = gcd(num, wheelRadius);
|
831
|
+
boost::dynamic_bitset<size_t> vec(primes.size(), 0);
|
832
|
+
while (true) {
|
833
|
+
BigInteger factor = gcd(num, wheelRadius);
|
835
834
|
if (factor == 1U) {
|
836
835
|
break;
|
837
836
|
}
|
838
837
|
num /= factor;
|
838
|
+
// Remove smooth primes from factor
|
839
839
|
for (size_t pi = 0U; pi < primes.size(); ++pi) {
|
840
840
|
const BigInteger& p = primes[pi];
|
841
|
-
if (
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
841
|
+
if (factor % p) {
|
842
|
+
continue;
|
843
|
+
}
|
844
|
+
factor /= p;
|
845
|
+
vec[pi] = !vec[pi];
|
846
|
+
if (factor == 1U) {
|
847
|
+
break;
|
847
848
|
}
|
848
849
|
}
|
849
850
|
if (num == 1U) {
|
850
|
-
|
851
|
+
return vec;
|
851
852
|
}
|
852
|
-
}
|
853
|
-
|
853
|
+
};
|
854
854
|
if (num != 1U) {
|
855
855
|
return boost::dynamic_bitset<size_t>();
|
856
856
|
}
|
@@ -879,7 +879,7 @@ struct Factorizer {
|
|
879
879
|
|
880
880
|
// Now that smooth parts have been shuffled, just multiply down the list until they are larger than square root of toFactor.
|
881
881
|
BigInteger smoothNumber = 1U;
|
882
|
-
boost::dynamic_bitset<size_t> fv(primes.size(),
|
882
|
+
boost::dynamic_bitset<size_t> fv(primes.size(), 0);
|
883
883
|
for (size_t spi = 0U; spi < smoothParts.size(); ++spi) {
|
884
884
|
const BigInteger &sp = smoothParts[spi];
|
885
885
|
// This multiplies together the factorizations of the smooth parts
|
@@ -897,7 +897,7 @@ struct Factorizer {
|
|
897
897
|
}
|
898
898
|
// Reset "smoothNumber" and its factorization vector.
|
899
899
|
smoothNumber = 1U;
|
900
|
-
fv = boost::dynamic_bitset<size_t>(primes.size(),
|
900
|
+
fv = boost::dynamic_bitset<size_t>(primes.size(), 0);
|
901
901
|
}
|
902
902
|
}
|
903
903
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|