Closed oogFranz closed 6 years ago
Make isProbablePrime more reliable.
Miller-Rabin Test with random sampling can detect some pseudo primes as a composite number. And with my local testing, the new isProbablePrime() works as fast as the original one. ref. https://github.com/peterolson/BigInteger.js/pull/48#issue-45877579
Coverage remained the same at 99.418% when pulling a110a848bdbf9f227aa7d4dcba119a2c2d0111ef on oogFranz:reliable_isProbablePrime into cf6754e3ee8e447ca60430614d6e9a678a537f18 on peterolson:master.
Thanks, looks good to me
Make isProbablePrime more reliable.
Miller-Rabin Test with random sampling can detect some pseudo primes as a composite number. And with my local testing, the new isProbablePrime() works as fast as the original one. ref. https://github.com/peterolson/BigInteger.js/pull/48#issue-45877579