Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. bool primality_sqrt_bound_coprime_2(__int64 a) {
  2. if(a == 2) return true;
  3. if(a % 2 == 0) return false;
  4. double lim = sqrt(a);
  5. for(int i = 3; i <= lim; i += 2)
  6. if(a % i == 0)
  7. return false;
  8. return true;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement