Class SquFoF31
- java.lang.Object
-
- de.tilman_neumann.jml.factor.FactorAlgorithm
-
- de.tilman_neumann.jml.factor.squfof.SquFoF31
-
public class SquFoF31 extends FactorAlgorithm
Shanks' SQUFOF algorithm, 31-bit version. This implementation works without fail for N <= 2^52 and is faster than SquFoF63 for N <= 2^51.- Author:
- Tilman Neumann
-
-
Field Summary
-
Fields inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
DEFAULT, NUM_PRIMES_FOR_31_BIT_TDIV, tdivLimit
-
-
Constructor Summary
Constructors Constructor Description SquFoF31()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longfindSingleFactor(long N)Find a factor of the given composite N. Warning: This method will not return when called with a prime argument.BigIntegerfindSingleFactor(BigInteger N)Find a single factor of the given N, which is composite and odd.StringgetName()static voidmain(String[] args)Test.protected Longtest(int Q_ip1)-
Methods inherited from class de.tilman_neumann.jml.factor.FactorAlgorithm
factor, factor, searchFactors
-
-
-
-
Method Detail
-
getName
public String getName()
- Specified by:
getNamein classFactorAlgorithm- Returns:
- The name of the algorithm, possibly including important parameters.
-
findSingleFactor
public BigInteger findSingleFactor(BigInteger N)
Description copied from class:FactorAlgorithmFind a single factor of the given N, which is composite and odd.- Specified by:
findSingleFactorin classFactorAlgorithm- Returns:
- factor
-
findSingleFactor
public long findSingleFactor(long N)
Find a factor of the given composite N. Warning: This method will not return when called with a prime argument.- Parameters:
N- composite integer- Returns:
- factor of N
-
test
protected Long test(int Q_ip1)
-
main
public static void main(String[] args)
Test.- Parameters:
args- ignored
-
-