Ordinary isPrime() has a bug that it can not identify pseudo primes such as 3,825,123,056,546,413,051 = 149491 747451 34233211.
To make the function more reliable and faster, I use Jim Sinclair' SPRP bases sets. The sets can distinguish at least 2^64 number.
ref. https://miller-rabin.appspot.com/
Coverage increased (+0.0007%) to 99.418% when pulling eea543a464dfeedd40a0aaf4877a0ff0775d8521 on oogFranz:reliable_isPrime into fece6dc8dd28605a3010b81edfaa63dbbedd2097 on peterolson:master.
Coverage increased (+0.0007%) to 99.418% when pulling eea543a464dfeedd40a0aaf4877a0ff0775d8521 on oogFranz:reliable_isPrime into fece6dc8dd28605a3010b81edfaa63dbbedd2097 on peterolson:master.
Ordinary isPrime() has a bug that it can not identify pseudo primes such as 3,825,123,056,546,413,051 = 149491 747451 34233211. To make the function more reliable and faster, I use Jim Sinclair' SPRP bases sets. The sets can distinguish at least 2^64 number. ref. https://miller-rabin.appspot.com/