c++ - How do i fix NTL PowerMod issue -
zz powermod(const zz& a, const zz& e, const zz& n)
i did following
zz a,b,c;
a=13; b=1; c=11;
zz result;
result = powermod(a,b,c);
i tried compile , run, powermod error , bad args.
it accept long,long,long , return long type.. issue did use powermod zz on previous other cpp file , fine.
void powermod(zz& x, const zz& a, const zz& e, const zz& n); zz powermod(const zz& a, const zz& e, const zz& n);
i know question bit old, i'll leave answer stumbling along looking answer find one.
according this: http://forums.codeguru.com/showthread.php?506099-ntl-problem
a must smaller n. don't know if problem, try: powermod(a % n, e, n)
Comments
Post a Comment