Skip to content

Commit

Permalink
accidentally pushed broken prime fix
Browse files Browse the repository at this point in the history
  • Loading branch information
name committed Mar 8, 2018
1 parent 3dcd895 commit 943e7dd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crypto/dag.cpp
Expand Up @@ -69,7 +69,7 @@ bool CDAGSystem::is_prime(uint64_t num) {
if ((num % 2 == 0) && num > 2)
return false;

for(uint64_t i = 3; i < num*num; i += 2) {
for(uint64_t i = 3; i <= sqrt(num); i += 2) {
if(num % i == 0)
return false;
}
Expand Down

0 comments on commit 943e7dd

Please sign in to comment.