Class BPSWTest
- java.lang.Object
-
- de.tilman_neumann.jml.primes.probable.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 Summary
Constructors Constructor Description BPSWTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisProbablePrime(long N)booleanisProbablePrime(BigInteger N)BigIntegernextProbablePrime(BigInteger N)
-
-
-
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
-
-