printf("\n");
}
+void bigrsh(unsigned s, unsigned r[], unsigned un[], int n)
+{
+ for (int i = 0; i < n - 1; i++)
+ r[i] = (un[i] >> s) | ((unsigned long long)un[i + 1] << (32 - s));
+ r[n - 1] = un[n - 1] >> s;
+}
+
bool bigmul(unsigned long long qhat, unsigned product[], unsigned vn[], int m,
int n)
{
// it and pass it back.
if (r != NULL)
{
- for (i = 0; i < n - 1; i++)
- r[i] = (un[i] >> s) | ((unsigned long long)un[i + 1] << (32 - s));
- r[n - 1] = un[n - 1] >> s;
+ bigrsh(s, r, un, n);
}
return 0;
}