progs/perftest.c: Use from Glibc syscall numbers.
[catacomb] / math / pgen.h
index b103c30..eef9141 100644 (file)
@@ -270,6 +270,29 @@ extern mp *pgen(const char */*name*/, mp */*d*/, mp */*m*/,
                unsigned /*steps*/, pgen_proc */*step*/, void */*sctx*/,
                unsigned /*tests*/, pgen_proc */*test*/, void */*tctx*/);
 
+/* --- @pgen_granfrob@ --- *
+ *
+ * Arguments:  @mp *n@ = an integer to test
+ *             @int a, b@ = coefficients; if @a@ is zero then choose
+ *                     automatically
+ *
+ * Returns:    One of the @PGEN_...@ codes.
+ *
+ * Use:                Performs a quadratic version of Grantham's Frobenius
+ *             primality test, which is a simple extension of the standard
+ *             Lucas test.
+ *
+ *             If %$a^2 - 4 b$% is a perfect square then the test can't
+ *             work; this function returns @PGEN_ABORT@ under these
+ *             circumstances.
+ *
+ *             If @a@ is zero on entry, then the function will choose
+ *             suitable parameters deterministically -- i.e., it always
+ *             chooses the same parameters for a given %$n$%.
+ */
+
+extern int pgen_granfrob(mp */*n*/, int /*a*/, int /*b*/);
+
 /* --- @pgen_primep@ --- *
  *
  * Arguments:  @mp *p@ = a number to check