projects
/
u
/
mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Karatsuba squaring algorithm.
[u/mdw/catacomb]
/
mp-arith.c
diff --git
a/mp-arith.c
b/mp-arith.c
index
6f00656
..
cd6b0bd
100644
(file)
--- a/
mp-arith.c
+++ b/
mp-arith.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-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
*
*
* Basic arithmetic on multiprecision integers
*
@@
-30,6
+30,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: mp-arith.c,v $
/*----- 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.
*
* 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);
mpw *s;
m = 2 * (m + 1) + 32;
s = MP_ALLOC(m);
- mpx_k
mul(d->v, d->vl, a->v, a
->vl, a->v, a->vl, s, s + m);
+ mpx_k
sqr(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);
MP_FREE(s);
} else
mpx_usqr(d->v, d->vl, a->v, a->vl);