/* -*-c-*-
*
- * $Id: mpmont-mexp.c,v 1.1 1999/11/19 13:19:29 mdw Exp $
+ * $Id: mpmont-mexp.c,v 1.2 1999/11/21 11:35:10 mdw Exp $
*
* Multiplle simultaneous exponentiations
*
/*----- Revision history --------------------------------------------------*
*
* $Log: mpmont-mexp.c,v $
+ * Revision 1.2 1999/11/21 11:35:10 mdw
+ * Performance improvement: use @mp_sqr@ and @mpmont_reduce@ instead of
+ * @mpmont_mul@ for squaring in exponentiation.
+ *
* Revision 1.1 1999/11/19 13:19:29 mdw
* Simultaneous exponentiation support.
*
/* --- Accumulate the result --- */
if (spare) {
- dd = mpmont_mul(mm, spare, a, a);
+ dd = mp_sqr(spare, a);
+ dd = mpmont_reduce(mm, dd, dd);
spare = a;
a = dd;
}