We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 799ea27 commit 3871436Copy full SHA for 3871436
FindAFactor/_find_a_factor.cpp
@@ -829,9 +829,8 @@ struct Factorizer {
829
// Compute the prime factorization modulo 2
830
boost::dynamic_bitset<size_t> factorizationVector(BigInteger num) {
831
boost::dynamic_bitset<size_t> vec(primes.size(), false);
832
- BigInteger factor = 1U;
833
- do {
834
- factor = gcd(num, wheelRadius);
+ while (true) {
+ BigInteger factor = gcd(num, wheelRadius);
835
if (factor == 1U) {
836
break;
837
}
@@ -852,7 +851,7 @@ struct Factorizer {
852
851
853
// Since we removed smooth primes,
854
// factor == 1U if the number is smooth.
855
- } while (factor == 1U);
+ };
856
857
if (num != 1U) {
858
return boost::dynamic_bitset<size_t>();
0 commit comments