Skip to content

Commit

Permalink
Make test more understandable
Browse files Browse the repository at this point in the history
  • Loading branch information
chiphogg committed Nov 12, 2024
1 parent b4d39da commit 73ec1eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion au/code/au/utility/test/probable_primes_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ TEST(MillerRabin, OddNumberIsProbablyPrimeIffPrimeOrPseudoprime) {

std::size_t i_prime = 2u; // Skip 2 and 3; they're too small for Miller-Rabin.
std::size_t i_pseudoprime = 0u;
for (uint64_t n = primes[i_prime]; i_prime < primes.size(); n += 2u) {
for (uint64_t n = primes[i_prime]; n <= primes.back(); n += 2u) {
const auto is_prime = (n == primes[i_prime]);
if (is_prime) {
++i_prime;
Expand Down

0 comments on commit 73ec1eb

Please sign in to comment.