This is an automated email from the git hooks/post-receive script.

ppm-guest pushed a commit to annotated tag v0.40
in repository libmath-prime-util-perl.

commit c81f07527775779b331d7d7c5e4a6766a4ec75a7
Author: Dana Jacobsen <d...@acm.org>
Date:   Fri Mar 28 07:02:15 2014 -0700

    AKS comments
---
 aks.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/aks.c b/aks.c
index 8e0dd20..81d9d06 100644
--- a/aks.c
+++ b/aks.c
@@ -4,14 +4,21 @@
 #include <math.h>
 #include <float.h>
 
-/*
- * The AKS v6 algorithm, for native integers.  Based on the AKS v6 paper.
- * As with most AKS implementations, it's really slow.
+/* The AKS primality algorithm for native integers.
+ *
+ * There are two versions here.  The v6 algorithm from the latest AKS paper,
+ * as well as one with improvements from Bernstein and Voloch and better r/s
+ * selection derived from Folkmar Bornemann's 2002 Pari implementation.
+ *
+ * Note that AKS is very, very slow compared to other methods.  It is, however,
+ * polynomial in log(N), and log-log performance graphs show nice straight
+ * lines for both implementations.  However APR-CL and ECPP both start out
+ * much faster and the slope will be less for any sizes of N that we're
+ * interested in.
+ *
+ * For native 64-bit integers this is purely a coding exercise, as BPSW is
+ * a million times faster and gives proven results.
  *
- * If we know there is a lgamma function (C99), then this uses the
- * improvements from Folkmar Bornemann's 2002 Pari implementation.  This
- * includes Bernstein and Voloch's much, much better r/s selection.  The
- * performance difference is huge.
  *
  * When n < 2^(wordbits/2)-1, we can do a straightforward intermediate:
  *      r = (r + a * b) % n

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to