xbyymn.traditional.c:


/* Modular multiplication */
long xbyymn(x,y,n) long x,y,n; {
   long result;

   if (n<=0)  return 0;
   result = 0;

   while (y>0) {
     if (y & 1) {
       result = xpymn(result,x,n);
     } 
     x=x<<1;
     y=y>>1;
   }

   return result;
}

Go to ...


This page is http://www.cc.utah.edu/~nahaj/factoring/xbyymn.traditional.c.html
© Copyright 2003 by John Halleck, All Rights Reserved.
This snapshot was last modified on December 24th, 2013