summaryrefslogtreecommitdiff
path: root/mpz/pow_ui.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2000-12-24 00:06:55 +0100
committerKevin Ryde <user42@zip.com.au>2000-12-24 00:06:55 +0100
commitdce108658eaa436a1e82df1c4ada2bbd36b5d071 (patch)
tree1faa5ee4f5d17d767f65690375c53e8f4a9eab17 /mpz/pow_ui.c
parent44531c849e7b1dc4b533e4a72677cf7eba63e973 (diff)
downloadgmp-dce108658eaa436a1e82df1c4ada2bbd36b5d071.tar.gz
* mpn/generic/sqrtrem.c, mpz/pow_ui.c, mpz/powm_ui.c, mpf/get_str.c,
mpf/set_str.c: Use mpn_sqr_n when applicable, not mpn_mul_n.
Diffstat (limited to 'mpz/pow_ui.c')
-rw-r--r--mpz/pow_ui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpz/pow_ui.c b/mpz/pow_ui.c
index 08e108448..ae78b9e39 100644
--- a/mpz/pow_ui.c
+++ b/mpz/pow_ui.c
@@ -1,6 +1,6 @@
/* mpz_pow_ui(res, base, exp) -- Set RES to BASE**EXP.
-Copyright 1991, 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+Copyright 1991, 1993, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -106,7 +106,7 @@ rpow (b, e, r)
for (i = BITS_PER_MP_LIMB - cnt - 2; i >= 0; i--)
{
- mpn_mul_n (tp, rp, rp, rsize);
+ mpn_sqr_n (tp, rp, rsize);
rsize = 2 * rsize;
rsize -= tp[rsize - 1] == 0;
xp = tp; tp = rp; rp = xp;