We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e214054 commit 220816cCopy full SHA for 220816c
FindAFactor/_find_a_factor.cpp
@@ -644,9 +644,13 @@ struct Factorizer {
644
x *= smoothNumberKeys[idx];
645
}
646
const BigInteger y = sqrt((x * x) % toFactor);
647
- // Uncomment to validate our math, overall
+ // The WHOLE point of EVERYTHING we've done
648
+ // is to guarantee this condition NEVER throws.
649
+ // If we're finding solutions with the right
650
+ // frequency as a function of rows saved,
651
+ // we've correctly executed Quadratic sieve.
652
if ((y * y) != ((x * x) % toFactor)) {
- throw std::runtime_error("Math is not self-consistent!");
653
+ throw std::runtime_error("Quadratic sieve math is not self-consistent!");
654
655
656
// Check x + y
0 commit comments