Lines Matching refs:k
421 int k, maxwds, sign, wds; member
477 static Bigint * Balloc(int k) in Balloc() argument
482 if (k > Kmax) { in Balloc()
487 if ((rv = freelist[k])) { in Balloc()
488 freelist[k] = rv->next; in Balloc()
490 x = 1 << k; in Balloc()
496 rv->k = k; in Balloc()
508 v->next = freelist[v->k]; in Bfree()
509 freelist[v->k] = v; in Bfree()
521 int j, k, *r; in rv_alloc() local
524 for(k = 0; in rv_alloc()
527 k++; in rv_alloc()
529 r = (int*)Balloc(k); in rv_alloc()
530 *r = k; in rv_alloc()
577 b1 = Balloc(b->k+1); in multadd()
590 int k = 0; in hi0bits() local
593 k = 16; in hi0bits()
597 k += 8; in hi0bits()
601 k += 4; in hi0bits()
605 k += 2; in hi0bits()
609 k++; in hi0bits()
614 return k; in hi0bits()
619 int k; in lo0bits() local
633 k = 0; in lo0bits()
635 k = 16; in lo0bits()
639 k += 8; in lo0bits()
643 k += 4; in lo0bits()
647 k += 2; in lo0bits()
651 k++; in lo0bits()
658 return k; in lo0bits()
674 int k, wa, wb, wc; in mult() local
686 k = a->k; in mult()
691 k++; in mult()
693 c = Balloc(k); in mult()
758 int i, k; in s2b() local
762 for(k = 0, y = 1; x > y; y <<= 1, k++) ; in s2b()
764 b = Balloc(k); in s2b()
768 b = Balloc(k+1); in s2b()
788 static Bigint * pow5mult(Bigint *b, int k) in pow5mult() argument
795 if ((i = k & 3)) { in pow5mult()
799 if (!(k >>= 2)) { in pow5mult()
809 if (k & 1) { in pow5mult()
814 if (!(k >>= 1)) { in pow5mult()
830 static Bigint *lshift(Bigint *b, int k) in lshift() argument
837 n = k >> 5; in lshift()
839 n = k >> 4; in lshift()
841 k1 = b->k; in lshift()
854 if (k &= 0x1f) { in lshift()
855 k1 = 32 - k; in lshift()
858 *x1++ = *x << k | z; in lshift()
867 if (k &= 0xf) { in lshift()
868 k1 = 16 - k; in lshift()
871 *x1++ = *x << k & 0xffff | z; in lshift()
942 c = Balloc(a->k); in diff()
1035 int k; local
1050 k = hi0bits(y);
1051 *e = 32 - k;
1053 if (k < Ebits) {
1054 d0 = Exp_1 | y >> (Ebits - k);
1056 d1 = y << ((32-Ebits) + k) | w >> (Ebits - k);
1060 if (k -= Ebits) {
1061 d0 = Exp_1 | y << k | z >> (32 - k);
1063 d1 = z << k | y >> (32 - k);
1070 if (k < Ebits + 16) {
1072 d0 = Exp_1 | y << k - Ebits | z >> Ebits + 16 - k;
1075 d1 = z << k + 16 - Ebits | w << k - Ebits | y >> 16 + Ebits - k;
1080 k -= Ebits + 16;
1081 d0 = Exp_1 | y << k + 16 | z << k | w >> 16 - k;
1083 d1 = w << k + 16 | y << k;
1100 int de, i, k; in d2b() local
1136 if ((k = lo0bits(&y))) { in d2b()
1137 x[0] = y | (z << (32 - k)); in d2b()
1138 z >>= k; in d2b()
1148 k = lo0bits(&z); in d2b()
1151 k += 32; in d2b()
1155 if (k = lo0bits(&y)) { in d2b()
1156 if (k >= 16) { in d2b()
1157 x[0] = y | z << 32 - k & 0xffff; in d2b()
1158 x[1] = z >> k - 16 & 0xffff; in d2b()
1159 x[2] = z >> k; in d2b()
1163 x[1] = y >> 16 | z << 16 - k & 0xffff; in d2b()
1164 x[2] = z >> k & 0xffff; in d2b()
1165 x[3] = z >> k+16; in d2b()
1180 k = lo0bits(&z); in d2b()
1181 if (k >= 16) { in d2b()
1189 k += 32; in d2b()
1199 *e = (de - Bias - (P-1) << 2) + k; in d2b()
1200 *bits = 4*P + 8 - k - hi0bits(word0(d) & Frac_mask); in d2b()
1202 *e = de - Bias - (P-1) + k; in d2b()
1203 *bits = P - k; in d2b()
1207 *e = de - Bias - (P-1) + 1 + k; in d2b()
1224 int k, ka, kb; in ratio() local
1229 k = ka - kb + 32*(a->wds - b->wds); in ratio()
1231 k = ka - kb + 16*(a->wds - b->wds); in ratio()
1234 if (k > 0) { in ratio()
1235 word0(da) += (k >> 2)*Exp_msk1; in ratio()
1236 if (k &= 3) { in ratio()
1237 da *= 1 << k; in ratio()
1240 k = -k; in ratio()
1241 word0(db) += (k >> 2)*Exp_msk1; in ratio()
1242 if (k &= 3) in ratio()
1243 db *= 1 << k; in ratio()
1246 if (k > 0) { in ratio()
1247 word0(da) += k*Exp_msk1; in ratio()
1249 k = -k; in ratio()
1250 word0(db) += k*Exp_msk1; in ratio()
1405 b->maxwds = 1 << (b->k = *(int*)b); in zend_freedtoa()
1480 j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, in zend_dtoa() local
1583 k = (int)ds; in zend_dtoa()
1584 if (ds < 0. && ds != k) in zend_dtoa()
1585 k--; /* want k = floor(ds) */ in zend_dtoa()
1587 if (k >= 0 && k <= Ten_pmax) { in zend_dtoa()
1588 if (value(d) < tens[k]) in zend_dtoa()
1589 k--; in zend_dtoa()
1601 if (k >= 0) { in zend_dtoa()
1603 s5 = k; in zend_dtoa()
1604 s2 += k; in zend_dtoa()
1607 b2 -= k; in zend_dtoa()
1608 b5 = -k; in zend_dtoa()
1638 i = ndigits + k + 1; in zend_dtoa()
1652 k0 = k; in zend_dtoa()
1655 if (k > 0) { in zend_dtoa()
1656 ds = tens[k&0xf]; in zend_dtoa()
1657 j = k >> 4; in zend_dtoa()
1671 else if ((j1 = -k)) { in zend_dtoa()
1683 k--; in zend_dtoa()
1743 k = k0; in zend_dtoa()
1749 if (be >= 0 && k <= Int_max) { in zend_dtoa()
1751 ds = tens[k]; in zend_dtoa()
1775 k++; in zend_dtoa()
1895 k--; in zend_dtoa()
1906 k = -1 - ndigits; in zend_dtoa()
1911 k++; in zend_dtoa()
1924 mhi = Balloc(mhi->k); in zend_dtoa()
2000 k++; in zend_dtoa()
2031 k = 0; in zend_dtoa()
2034 *decpt = k + 1; in zend_dtoa()
2047 e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign; in zend_strtod() local
2175 k = nd < DBL_DIG + 1 ? nd : DBL_DIG + 1; in zend_strtod()
2177 if (k > 9) in zend_strtod()
2178 value(rv) = tens[k - 9] * value(rv) + z; in zend_strtod()
2231 e1 += nd - k; in zend_strtod()
2321 bd = Balloc(bd0->k); in zend_strtod()