Prime check

How to check number is prime or not, does anyone have correct code for primality test which was fast

enough for large number.

I used this code : http://www.sanfoundry.com/cpp-program-implement-miller-rabin-primality-test/

But it gives 999999999999999989 non prime.

1 Like

You can check this out.

I have never got a wrong answer using this library of mine till date. :slight_smile:

8 Likes