Karatsuba squaring algorithm.
[u/mdw/catacomb] / mp-arith.c
index 6f00656..cd6b0bd 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: mp-arith.c,v 1.2 1999/12/10 23:18:39 mdw Exp $
+ * $Id: mp-arith.c,v 1.3 1999/12/11 10:57:43 mdw Exp $
  *
  * Basic arithmetic on multiprecision integers
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: mp-arith.c,v $
+ * Revision 1.3  1999/12/11 10:57:43  mdw
+ * Karatsuba squaring algorithm.
+ *
  * Revision 1.2  1999/12/10 23:18:39  mdw
  * Change interface for suggested destinations.
  *
@@ -242,7 +245,7 @@ mp *mp_sqr(mp *d, mp *a)
     mpw *s;
     m = 2 * (m + 1) + 32;
     s = MP_ALLOC(m);
-    mpx_kmul(d->v, d->vl, a->v, a->vl, a->v, a->vl, s, s + m);
+    mpx_ksqr(d->v, d->vl, a->v, a->vl, s, s + m);
     MP_FREE(s);
   } else 
     mpx_usqr(d->v, d->vl, a->v, a->vl);