avoid alias of x

dev
MITSUNARI Shigeo 7 years ago
parent 55d656ed41
commit 001ffbe03e
  1. 4
      include/mcl/vint.hpp

@ -1287,7 +1287,7 @@ public:
if (y.isNeg_) throw cybozu::Exception("Vint::pow:negative y") << y; if (y.isNeg_) throw cybozu::Exception("Vint::pow:negative y") << y;
const VintT xx = x; const VintT xx = x;
z = 1; z = 1;
mcl::fp::powGeneric(z, x, &y.buf_[0], y.size(), mul, sqr, (void (*)(VintT&, const VintT&))0); mcl::fp::powGeneric(z, xx, &y.buf_[0], y.size(), mul, sqr, (void (*)(VintT&, const VintT&))0);
} }
static void pow(VintT& z, const VintT& x, int y) static void pow(VintT& z, const VintT& x, int y)
{ {
@ -1295,7 +1295,7 @@ public:
const VintT xx = x; const VintT xx = x;
Unit absY = std::abs(y); Unit absY = std::abs(y);
z = 1; z = 1;
mcl::fp::powGeneric(z, x, &absY, 1, mul, sqr, (void (*)(VintT&, const VintT&))0); mcl::fp::powGeneric(z, xx, &absY, 1, mul, sqr, (void (*)(VintT&, const VintT&))0);
} }
/* /*
z = x ^ y mod m z = x ^ y mod m

Loading…
Cancel
Save