aboutsummaryrefslogtreecommitdiffstats
path: root/src/math/numbertheory/ressol.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-17 16:38:52 +0000
committerlloyd <[email protected]>2009-11-17 16:38:52 +0000
commit32d8a82ab0785e55b00b82d029f50d13e00418ce (patch)
tree16816343eeac878ff764fed7e91fc3f0a9efd6fb /src/math/numbertheory/ressol.cpp
parentad997f9699d025efaf8eb62d138af124bc0c16a6 (diff)
In ressol(), t is just an alias for s and is not modified, remove it
Diffstat (limited to 'src/math/numbertheory/ressol.cpp')
-rw-r--r--src/math/numbertheory/ressol.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/math/numbertheory/ressol.cpp b/src/math/numbertheory/ressol.cpp
index d51acb8bd..4696168b8 100644
--- a/src/math/numbertheory/ressol.cpp
+++ b/src/math/numbertheory/ressol.cpp
@@ -64,12 +64,11 @@ BigInt ressol(const BigInt& a, const BigInt& p)
q = mod_p.square(q);
++i;
}
- u32bit t = s;
- if(t <= i)
+ if(s <= i)
return -BigInt(1);
- c = power_mod(c, BigInt(BigInt::Power2, t-i-1), p);
+ c = power_mod(c, BigInt(BigInt::Power2, s-i-1), p);
r = mod_p.multiply(r, c);
c = mod_p.square(c);
n = mod_p.multiply(n, c);