Class BPSWTest


  • public class BPSWTest
    extends Object
    BPSW probable prime test. The implementation starts checking the moduli of N % 30030 and then follows [http://en.wikipedia.org/wiki/Baillie-PSW_primality_test] and references therein. Note that BPSW may be considered a deterministic prime test for N < 2^64.
    Author:
    Tilman Neumann
    • Constructor Detail

      • BPSWTest

        public BPSWTest()
    • Method Detail

      • isProbablePrime

        public boolean isProbablePrime​(long N)
      • isProbablePrime

        public boolean isProbablePrime​(BigInteger N)
      • nextProbablePrime

        public BigInteger nextProbablePrime​(BigInteger N)
        Parameters:
        N -
        Returns:
        first prime > N