Class BPSWTest

java.lang.Object
de.tilman_neumann.jml.primes.probable.BPSWTest

public class BPSWTest
extends java.lang.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.
  • Constructor Summary

    Constructors
    Constructor Description
    BPSWTest()  
  • Method Summary

    Modifier and Type Method Description
    boolean isProbablePrime​(long N)  
    boolean isProbablePrime​(java.math.BigInteger N)  
    java.math.BigInteger nextProbablePrime​(java.math.BigInteger N)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BPSWTest

      public BPSWTest()
  • Method Details

    • isProbablePrime

      public boolean isProbablePrime​(long N)
    • isProbablePrime

      public boolean isProbablePrime​(java.math.BigInteger N)
    • nextProbablePrime

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