Skip to content

Commit

Permalink
Do a further logic simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed Dec 12, 2024
1 parent 16458c6 commit 0cabd6d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion math/wide_integer/uintwide_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -7182,7 +7182,9 @@

// Loop over the trials to perform the primality testing.

for(std::size_t idx { UINT8_C(0) }; ((idx < number_of_trials) && result); ++idx) // NOLINT(altera-id-dependent-backward-branch)
std::size_t idx { UINT8_C(0) };

do
{
x = distribution(generator, params);
y = powm(x, q, np);
Expand Down Expand Up @@ -7227,7 +7229,10 @@
// Mark failure if (y == 1) and (jdx != 0).
result = false;
}

++idx;
}
while((idx < number_of_trials) && result);

return result;
}
Expand Down

0 comments on commit 0cabd6d

Please sign in to comment.