Lines Matching refs:k
540 int k, maxwds, sign, wds; member
581 (k) int k; in Balloc() argument
583 (int k)
595 if (k <= Kmax && (rv = freelist[k]))
596 freelist[k] = rv->next;
598 x = 1 << k;
608 if (k <= Kmax && pmem_next - private_mem + len <= PRIVATE_mem) {
619 rv->k = k;
636 if (v->k > Kmax)
644 v->next = freelist[v->k];
645 freelist[v->k] = v;
700 b1 = Balloc(b->k+1);
720 int i, k; local
724 for(k = 0, y = 1; x > y; y <<= 1, k++) ;
726 b = Balloc(k);
730 b = Balloc(k+1);
757 int k = 0; local
760 k = 16;
764 k += 8;
768 k += 4;
772 k += 2;
776 k++;
780 return k;
791 int k; local
804 k = 0;
806 k = 16;
810 k += 8;
814 k += 4;
818 k += 2;
822 k++;
828 return k;
856 int k, wa, wb, wc; local
873 k = a->k;
878 k++;
879 c = Balloc(k);
962 (b, k) Bigint *b; int k; in pow5mult() argument
964 (Bigint *b, int k)
971 if ((i = k & 3))
974 if (!(k >>= 2))
991 if (k & 1) {
996 if (!(k >>= 1))
1019 (b, k) Bigint *b; int k; in lshift() argument
1021 (Bigint *b, int k)
1029 n = k >> 5;
1031 n = k >> 4;
1033 k1 = b->k;
1044 if (k &= 0x1f) {
1045 k1 = 32 - k;
1048 *x1++ = *x << k | z;
1056 if (k &= 0xf) {
1057 k1 = 16 - k;
1060 *x1++ = *x << k & 0xffff | z;
1145 c = Balloc(a->k);
1255 int k; local
1270 k = hi0bits(y);
1271 *e = 32 - k;
1273 if (k < Ebits) {
1274 d0 = Exp_1 | y >> (Ebits - k);
1276 d1 = y << ((32-Ebits) + k) | w >> (Ebits - k);
1280 if (k -= Ebits) {
1281 d0 = Exp_1 | y << k | z >> (32 - k);
1283 d1 = z << k | y >> (32 - k);
1290 if (k < Ebits + 16) {
1292 d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
1295 d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
1300 k -= Ebits + 16;
1301 d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
1303 d1 = w << k + 16 | y << k;
1325 int de, k; local
1359 if ((k = lo0bits(&y))) {
1360 x[0] = y | z << (32 - k);
1361 z >>= k;
1371 k = lo0bits(&z);
1377 k += 32;
1381 if (k = lo0bits(&y))
1382 if (k >= 16) {
1383 x[0] = y | z << 32 - k & 0xffff;
1384 x[1] = z >> k - 16 & 0xffff;
1385 x[2] = z >> k;
1390 x[1] = y >> 16 | z << 16 - k & 0xffff;
1391 x[2] = z >> k & 0xffff;
1392 x[3] = z >> k+16;
1408 k = lo0bits(&z);
1409 if (k >= 16) {
1418 k += 32;
1428 *e = (de - Bias - (P-1) << 2) + k;
1429 *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask);
1431 *e = de - Bias - (P-1) + k;
1432 *bits = P - k;
1437 *e = de - Bias - (P-1) + 1 + k;
1459 int k, ka, kb; local
1464 k = ka - kb + 32*(a->wds - b->wds);
1466 k = ka - kb + 16*(a->wds - b->wds);
1469 if (k > 0) {
1470 word0(&da) += (k >> 2)*Exp_msk1;
1471 if (k &= 3)
1472 dval(&da) *= 1 << k;
1475 k = -k;
1476 word0(&db) += (k >> 2)*Exp_msk1;
1477 if (k &= 3)
1478 dval(&db) *= 1 << k;
1481 if (k > 0)
1482 word0(&da) += k*Exp_msk1;
1484 k = -k;
1485 word0(&db) += k*Exp_msk1;
1716 b1 = Balloc(b->k+1);
1732 rshift(b, k) Bigint *b; int k; in rshift() argument
1734 rshift(Bigint *b, int k)
1741 n = k >> kshift;
1745 if (k &= kmask) {
1746 n = 32 - k;
1747 y = *x++ >> k;
1750 y = *x++ >> k;
1765 any_on(b, k) Bigint *b; int k; in any_on() argument
1767 any_on(Bigint *b, int k)
1775 n = k >> kshift;
1778 else if (n < nwds && (k &= kmask)) {
1780 x1 >>= k;
1781 x1 <<= k;
1812 int big, denorm, esign, havedig, k, n, nbits, up, zret; local
1979 for(k = 0; n > (1 << (kshift-2)) - 1; n >>= 1)
1980 k++;
1981 b = Balloc(k);
2016 k = n - 1;
2017 if (x[k>>kshift] & 1 << (k & kmask)) {
2019 if (k > 0 && any_on(b,k))
2072 k = n - 1;
2075 else if (k > 0)
2076 lostbits = any_on(b,k);
2077 if (x[k>>kshift] & 1 << (k & kmask))
2100 k = b->wds;
2110 else if (b->wds > k
2112 && hi0bits(x[k-1]) < 32-n)) {
2128 k = b->x[0] & ((1 << j) - 1);
2130 if (k) {
2142 if (k & j && ((k & (j-1)) | lostbits))
2540 int esign, i, j, k, nd, nd0, nf, nz, nz0, nz1, sign; local
2770 k = nd < DBL_DIG + 2 ? nd : DBL_DIG + 2;
2772 if (k > 9) {
2774 if (k > DBL_DIG)
2777 dval(&rv) = tens[k - 9] * dval(&rv) + z;
2852 e1 += nd - k;
2857 if (k <= DBL_DIG)
3035 bd = Balloc(bd0->k);
3622 int j, k, *r; local
3625 for(k = 0;
3628 k++;
3629 r = (int*)Balloc(k);
3630 *r = k;
3668 b->maxwds = 1 << (b->k = *(int*)b);
3754 j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, local
3898 k = (int)ds;
3899 if (ds < 0. && ds != k)
3900 k--; /* want k = floor(ds) */
3902 if (k >= 0 && k <= Ten_pmax) {
3903 if (dval(&u) < tens[k])
3904 k--;
3916 if (k >= 0) {
3918 s5 = k;
3919 s2 += k;
3922 b2 -= k;
3923 b5 = -k;
3962 i = ndigits + k + 1;
3981 k0 = k;
3984 if (k > 0) {
3985 ds = tens[k&0xf];
3986 j = k >> 4;
4000 else if ((j1 = -k)) {
4012 k--;
4085 k = k0;
4091 if (be >= 0 && k <= Int_max) {
4093 ds = tens[k];
4135 k++;
4225 k--;
4236 k = -1 - ndigits;
4241 k++;
4254 mhi = Balloc(mhi->k);
4380 k++;
4414 *decpt = k + 1;