X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/ef5f48103e83977bda6ef4d7d1aacbb66a629b10..4ab1268f3ec850a115a68966325aced4f08ec603:/mp-arith.c diff --git a/mp-arith.c b/mp-arith.c index 6f00656..cd6b0bd 100644 --- a/mp-arith.c +++ b/mp-arith.c @@ -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);