34 #ifndef MULTIPLE_THREADS 49 for(k = 0;
sizeof(
Bigint) -
sizeof(
ULong) -
sizeof(int) + j <= (
size_t)i; j <<= 1)
56 #ifndef MULTIPLE_THREADS 74 while((*t = *s++) != 0)
103 b->
maxwds = 1 << (b->
k = *(
int*)b);
105 #ifndef MULTIPLE_THREADS 122 ULong *bx, *bxe, q, *sx, *sxe;
124 ULLong borrow, carry, y, ys;
126 ULong borrow, carry, y, ys;
135 Bug(
"oversize b in quorem");
147 q = *bxe / (*sxe + 1);
150 Bug(
"oversized quotient in quorem");
159 ys = *sx++ * (
ULLong)q + carry;
161 y = *bx - (ys & 0xffffffff
UL) - borrow;
162 borrow = y >> 32 & 1
UL;
163 *bx++ = y & 0xffffffff
UL;
167 ys = (si & 0xffff) * q + carry;
168 zs = (si >> 16) * q + (ys >> 16);
170 y = (*bx & 0xffff) - (ys & 0xffff) - borrow;
171 borrow = (y & 0x10000) >> 16;
172 z = (*bx >> 16) - (zs & 0xffff) - borrow;
173 borrow = (z & 0x10000) >> 16;
176 ys = *sx++ * q + carry;
178 y = *bx - (ys & 0xffff) - borrow;
179 borrow = (y & 0x10000) >> 16;
187 while(--bxe > bx && !*bxe)
206 y = *bx - (ys & 0xffffffff
UL) - borrow;
207 borrow = y >> 32 & 1
UL;
208 *bx++ = y & 0xffffffff
UL;
212 ys = (si & 0xffff) + carry;
213 zs = (si >> 16) + (ys >> 16);
215 y = (*bx & 0xffff) - (ys & 0xffff) - borrow;
216 borrow = (y & 0x10000) >> 16;
217 z = (*bx >> 16) - (zs & 0xffff) - borrow;
218 borrow = (z & 0x10000) >> 16;
223 y = *bx - (ys & 0xffff) - borrow;
224 borrow = (y & 0x10000) >> 16;
233 while(--bxe > bx && !*bxe)
int quorem(Bigint *b, Bigint *S)
#define Storeinc(a, b, c)
char * nrv_alloc(char *s, char **rve, int n)
int cmp(Bigint *a, Bigint *b)