Package de.tilman_neumann.jml.squareSums
Class FourSquaresFinder
java.lang.Object
de.tilman_neumann.jml.squareSums.FourSquaresFinder
public class FourSquaresFinder
extends java.lang.Object
An implementation of the algorithm of Pollack and Treviño that finds some four squares representation of an odd number n
in O((log n)^2 * (log log n)^-1) given that ERH (the extended Riemann hypothesis) holds.
-
Constructor Summary
Constructors Constructor Description FourSquaresFinder()
Full constructor. -
Method Summary
Modifier and Type Method Description void
find(java.math.BigInteger n)
Find a four square representation of odd n.int
getNumberOfIterations()
java.lang.String
getPhaseTimings()
java.math.BigInteger[]
getSquareBases()
java.lang.String
getStep2Subtimings()
static void
main(java.lang.String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
FourSquaresFinder
public FourSquaresFinder()Full constructor. One instance may be used for several four squares decompositions, the timings are accumulated.
-
-
Method Details
-
find
public void find(java.math.BigInteger n)Find a four square representation of odd n.- Parameters:
n
- an odd integer > 20
-
getSquareBases
public java.math.BigInteger[] getSquareBases() -
getNumberOfIterations
public int getNumberOfIterations() -
getPhaseTimings
public java.lang.String getPhaseTimings() -
getStep2Subtimings
public java.lang.String getStep2Subtimings() -
main
public static void main(java.lang.String[] args)
-