summaryrefslogtreecommitdiff
path: root/mpz/powm.c
diff options
context:
space:
mode:
authortege <tege@gmplib.org>2001-11-06 13:30:10 +0100
committertege <tege@gmplib.org>2001-11-06 13:30:10 +0100
commitca173759a726affca32f8bebde91e467a0963cb1 (patch)
tree3c89d85e9dfa2f658516844f66c69f9fe518d66a /mpz/powm.c
parent2fface9d34543efff115aa17b6867a12f7dcce06 (diff)
downloadgmp-ca173759a726affca32f8bebde91e467a0963cb1.tar.gz
Fix some comments per Paul's suggestions.
Rid one more usage of variable `k'.
Diffstat (limited to 'mpz/powm.c')
-rw-r--r--mpz/powm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mpz/powm.c b/mpz/powm.c
index 1b6b79e9a..2e8f058ef 100644
--- a/mpz/powm.c
+++ b/mpz/powm.c
@@ -332,8 +332,8 @@ pow (mpz_srcptr b, mpz_srcptr e, mpz_srcptr m, mpz_ptr r)
while (i > 0 || sh > 0)
{
c = ep[i];
- sh -= k;
l = k; /* number of bits treated */
+ sh -= l;
if (sh < 0)
{
if (i > 0)
@@ -374,13 +374,13 @@ pow (mpz_srcptr b, mpz_srcptr e, mpz_srcptr m, mpz_ptr r)
}
}
- /* Replace xx by xx^(2^k)*x^c. */
+ /* Replace xx by xx^(2^l)*x^c. */
if (c != 0)
{
for (j = 0; c % 2 == 0; j++)
c >>= 1;
- /* c0 = c * 2^j, i.e. xx^(2^k)*x^c = (A^(2^(k - j))*c)^(2^j) */
+ /* c0 = c * 2^j, i.e. xx^(2^l)*x^c = (A^(2^(l - j))*c)^(2^j) */
l -= j;
while (--l >= 0)
{