(adsbygoogle = window.adsbygoogle || []).push({}); Beating Pari: fast primality test for small numbers

I'm looking for a library (or just a program) with a fast primality test for 64-bit numbers. In particular I'd like something that's faster than Pari which I'm currently using. I do need it to be programmable, of course, since billions of tests need to be done.

Any ideas? Or is Pari essentially as fast as I can get?

I'm going to try to port my program to Mathematica to do a speed comparison, but in past tests Pari beats Mathematica soundly in number theory.

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Fast primality test for small numbers

**Physics Forums | Science Articles, Homework Help, Discussion**