Use @MP_EQ@ instead of @MP_CMP@.
[u/mdw/catacomb] / mpx.h
diff --git a/mpx.h b/mpx.h
index 509da02..cb49bd4 100644 (file)
--- a/mpx.h
+++ b/mpx.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: mpx.h,v 1.8 1999/12/11 10:57:43 mdw Exp $
+ * $Id: mpx.h,v 1.10 2000/10/08 12:06:12 mdw Exp $
  *
  * Low level multiprecision arithmetic
  *
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: mpx.h,v $
+ * Revision 1.10  2000/10/08 12:06:12  mdw
+ * Provide @mpx_ueq@ for rapidly testing equality of two integers.
+ *
+ * Revision 1.9  1999/12/22 15:49:07  mdw
+ * New function for division by a small integer.
+ *
  * Revision 1.8  1999/12/11 10:57:43  mdw
  * Karatsuba squaring algorithm.
  *
@@ -310,6 +316,19 @@ extern void mpx_lsr(mpw */*dv*/, mpw */*dvl*/,
 extern void mpx_2c(mpw */*dv*/, mpw */*dvl*/,
                   const mpw */*v*/, const mpw */*vl*/);
 
+/* --- @mpx_ueq@ --- *
+ *
+ * Arguments:  @const mpw *av, *avl@ = first argument vector base and limit
+ *             @const mpw *bv, *bvl@ = second argument vector base and limit
+ *
+ * Returns:    Nonzero if the two vectors are equal.
+ *
+ * Use:                Performs an unsigned integer test for equality.
+ */
+
+extern int mpx_ueq(const mpw */*av*/, const mpw */*avl*/,
+                  const mpw */*bv*/, const mpw */*bvl*/);
+
 /* --- @mpx_ucmp@ --- *
  *
  * Arguments:  @const mpw *av, *avl@ = first argument vector base and limit
@@ -539,6 +558,21 @@ extern void mpx_udiv(mpw */*qv*/, mpw */*qvl*/, mpw */*rv*/, mpw */*rvl*/,
                     const mpw */*dv*/, const mpw */*dvl*/,
                     mpw */*sv*/, mpw */*svl*/);
 
+/* --- @mpx_udivn@ --- *
+ *
+ * Arguments:  @mpw *qv, *qvl@ = storage for the quotient (may overlap
+ *                     dividend)
+ *             @const mpw *rv, *rvl@ = dividend
+ *             @mpw d@ = single-precision divisor
+ *
+ * Returns:    Remainder after divison.
+ *
+ * Use:                Performs a single-precision division operation.
+ */
+
+extern mpw mpx_udivn(mpw */*qv*/, mpw */*qvl*/,
+                    const mpw */*rv*/, const mpw */*rvl*/, mpw /*d*/);
+
 /*----- Karatsuba multiplication algorithms -------------------------------*/
 
 /* --- @KARATSUBA_CUTOFF@ --- *
@@ -557,7 +591,7 @@ extern void mpx_udiv(mpw */*qv*/, mpw */*qvl*/, mpw */*rv*/, mpw */*rvl*/,
  * required is proportional to the recursion depth.
  */
 
-#define KARATSUBA_SLOP 32
+#define KARATSUBA_SLOP 64
 
 /* --- @mpx_kmul@ --- *
  *