/* Modular exponentiation */
long xtoymn(x,y,n) long x,y,n; {
long result;
if (n<=0) return 0;
result = 1;
while (y>0) {
if (y & 1) {
result = xbyymn(result,x,n);
}
x = xbyymn (x,x,n) ;
y = y>>1 ;
}
return result;
}
This page is http://www.cc.utah.edu/~nahaj/factoring/xtoymn.c.html
© Copyright 2000 by John Halleck, All Rights Reserved.
This snapshot was last modified on January 18th, 2001
And the underlying file was last modified on January 4th, 1998