Lines Matching refs:k
420 int k, maxwds, sign, wds; member
476 static Bigint * Balloc(int k) in Balloc() argument
481 if (k > Kmax) { in Balloc()
486 if ((rv = freelist[k])) { in Balloc()
487 freelist[k] = rv->next; in Balloc()
489 x = 1 << k; in Balloc()
495 rv->k = k; in Balloc()
507 v->next = freelist[v->k]; in Bfree()
508 freelist[v->k] = v; in Bfree()
520 int j, k, *r; in rv_alloc() local
523 for(k = 0; in rv_alloc()
526 k++; in rv_alloc()
528 r = (int*)Balloc(k); in rv_alloc()
529 *r = k; in rv_alloc()
576 b1 = Balloc(b->k+1); in multadd()
589 int k = 0; in hi0bits() local
592 k = 16; in hi0bits()
596 k += 8; in hi0bits()
600 k += 4; in hi0bits()
604 k += 2; in hi0bits()
608 k++; in hi0bits()
613 return k; in hi0bits()
618 int k; in lo0bits() local
632 k = 0; in lo0bits()
634 k = 16; in lo0bits()
638 k += 8; in lo0bits()
642 k += 4; in lo0bits()
646 k += 2; in lo0bits()
650 k++; in lo0bits()
657 return k; in lo0bits()
673 int k, wa, wb, wc; in mult() local
685 k = a->k; in mult()
690 k++; in mult()
692 c = Balloc(k); in mult()
757 int i, k; in s2b() local
761 for(k = 0, y = 1; x > y; y <<= 1, k++) ; in s2b()
763 b = Balloc(k); in s2b()
767 b = Balloc(k+1); in s2b()
787 static Bigint * pow5mult(Bigint *b, int k) in pow5mult() argument
794 if ((i = k & 3)) { in pow5mult()
798 if (!(k >>= 2)) { in pow5mult()
808 if (k & 1) { in pow5mult()
813 if (!(k >>= 1)) { in pow5mult()
829 static Bigint *lshift(Bigint *b, int k) in lshift() argument
836 n = k >> 5; in lshift()
838 n = k >> 4; in lshift()
840 k1 = b->k; in lshift()
853 if (k &= 0x1f) { in lshift()
854 k1 = 32 - k; in lshift()
857 *x1++ = *x << k | z; in lshift()
866 if (k &= 0xf) { in lshift()
867 k1 = 16 - k; in lshift()
870 *x1++ = *x << k & 0xffff | z; in lshift()
941 c = Balloc(a->k); in diff()
1034 int k; local
1049 k = hi0bits(y);
1050 *e = 32 - k;
1052 if (k < Ebits) {
1053 d0 = Exp_1 | y >> (Ebits - k);
1055 d1 = y << ((32-Ebits) + k) | w >> (Ebits - k);
1059 if (k -= Ebits) {
1060 d0 = Exp_1 | y << k | z >> (32 - k);
1062 d1 = z << k | y >> (32 - k);
1069 if (k < Ebits + 16) {
1071 d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
1074 d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
1079 k -= Ebits + 16;
1080 d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
1082 d1 = w << k + 16 | y << k;
1099 int de, i, k; in d2b() local
1135 if ((k = lo0bits(&y))) { in d2b()
1136 x[0] = y | (z << (32 - k)); in d2b()
1137 z >>= k; in d2b()
1147 k = lo0bits(&z); in d2b()
1150 k += 32; in d2b()
1154 if (k = lo0bits(&y)) { in d2b()
1155 if (k >= 16) { in d2b()
1156 x[0] = y | z << 32 - k & 0xffff; in d2b()
1157 x[1] = z >> k - 16 & 0xffff; in d2b()
1158 x[2] = z >> k; in d2b()
1162 x[1] = y >> 16 | z << 16 - k & 0xffff; in d2b()
1163 x[2] = z >> k & 0xffff; in d2b()
1164 x[3] = z >> k+16; in d2b()
1179 k = lo0bits(&z); in d2b()
1180 if (k >= 16) { in d2b()
1188 k += 32; in d2b()
1198 *e = (de - Bias - (P-1) << 2) + k; in d2b()
1199 *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask); in d2b()
1201 *e = de - Bias - (P-1) + k; in d2b()
1202 *bits = P - k; in d2b()
1206 *e = de - Bias - (P-1) + 1 + k; in d2b()
1223 int k, ka, kb; in ratio() local
1228 k = ka - kb + 32*(a->wds - b->wds); in ratio()
1230 k = ka - kb + 16*(a->wds - b->wds); in ratio()
1233 if (k > 0) { in ratio()
1234 word0(da) += (k >> 2)*Exp_msk1; in ratio()
1235 if (k &= 3) { in ratio()
1236 da *= 1 << k; in ratio()
1239 k = -k; in ratio()
1240 word0(db) += (k >> 2)*Exp_msk1; in ratio()
1241 if (k &= 3) in ratio()
1242 db *= 1 << k; in ratio()
1245 if (k > 0) { in ratio()
1246 word0(da) += k*Exp_msk1; in ratio()
1248 k = -k; in ratio()
1249 word0(db) += k*Exp_msk1; in ratio()
1404 b->maxwds = 1 << (b->k = *(int*)b); in zend_freedtoa()
1479 j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, in zend_dtoa() local
1582 k = (int)ds; in zend_dtoa()
1583 if (ds < 0. && ds != k) in zend_dtoa()
1584 k--; /* want k = floor(ds) */ in zend_dtoa()
1586 if (k >= 0 && k <= Ten_pmax) { in zend_dtoa()
1587 if (value(d) < tens[k]) in zend_dtoa()
1588 k--; in zend_dtoa()
1600 if (k >= 0) { in zend_dtoa()
1602 s5 = k; in zend_dtoa()
1603 s2 += k; in zend_dtoa()
1606 b2 -= k; in zend_dtoa()
1607 b5 = -k; in zend_dtoa()
1637 i = ndigits + k + 1; in zend_dtoa()
1651 k0 = k; in zend_dtoa()
1654 if (k > 0) { in zend_dtoa()
1655 ds = tens[k&0xf]; in zend_dtoa()
1656 j = k >> 4; in zend_dtoa()
1670 else if ((j1 = -k)) { in zend_dtoa()
1682 k--; in zend_dtoa()
1742 k = k0; in zend_dtoa()
1748 if (be >= 0 && k <= Int_max) { in zend_dtoa()
1750 ds = tens[k]; in zend_dtoa()
1774 k++; in zend_dtoa()
1894 k--; in zend_dtoa()
1905 k = -1 - ndigits; in zend_dtoa()
1910 k++; in zend_dtoa()
1923 mhi = Balloc(mhi->k); in zend_dtoa()
1999 k++; in zend_dtoa()
2030 k = 0; in zend_dtoa()
2033 *decpt = k + 1; in zend_dtoa()
2042 e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; in zend_strtod() local
2170 k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1; in zend_strtod()
2172 if (k > 9) in zend_strtod()
2173 value(rv) = tens[k - 9] * value(rv) + z; in zend_strtod()
2226 e1 += nd - k; in zend_strtod()
2316 bd = Balloc(bd0->k); in zend_strtod()