unsigned m [8])
{//a (mod m);
int i = 16;
do {i -;} while (a [i] == 0);
int j = 8;
do {j -;} while (m [j] == 0);
unsigned * temp1 = new unsigned [16];
unsigned * temp2 = new unsigned [16];
if ((i> j) | | ((i == j) && (a [i]> m [j])))
{
do
{
for (int g = 0; g <16; g+ +) temp1 [g] = 0;
if (a [i]> = m [j])
{
point.b = (a [i]/m [j]);
temp1 [i - j] = (point.a [0] == 0)? 1: point.a [0];
}
else
{
i -;
point.a [0] = a [i];
point.a [1] = a [i +1];
point.b = (point.b/m [j]) - 1;
temp1 [i - j] = (point.a [0] == 0)? 1: point.a [0];
temp1 [i - j + 1] = point.a [1];
}
Mult16 (m, temp1, temp2);
Razn16 (a, temp2, temp1);
for (g = 0; g <16; g+ +) a [g] = temp1 [g];
i = 16;
do
{ i -;
if (i == -1) {i = 0; break;}
} while (a [i] == 0);
} while (i! = j);
for (int g = 8; g <16; g+ +) temp2 [g] = 0;
for (g = 0; g <8; g+ +) temp2 [g] = m [g];
while (a [i]> = m [j])
{
Razn16 (a, temp2, temp1);
for (g = 0; g <16; g+ +) a [g] = temp1 [g];
} ;
} ;
delete temp1;
delete temp2;
}
// ---------------------------------------- ------------------------ Razn16 (unsigned a [16], unsigned b [16], unsigned rez [16])
{//a - b = rez;
for (int i = 0; i <16; i + +) rez [i] = 0;
unsigned * temp = new unsigned [17];
for (i = 0; i <16; i + +) temp [i] = a [i];
temp [17] = 0;
unsigned p = 17;
do {p -;} while (a [p] == 0);
for (i = 0; i <= p; i + +)
{
point.a [0] = temp [i];
point.a [1] = temp [i +1];
point.b - ...