Lines Matching +full:10 +full:k
41 int i, k; local
46 k = 0;
49 k++;
52 if (!k)
53 k = 1;
55 b = Balloc(k);
84 * to determine k = floor(log10(d)). We scale relevant
85 * quantities using O(log2(k)) rather than O(k) multiplications.
105 * the correctly rounded result. For k requested digits and
107 * something like 10^(k-15) that we must resort to the Long
157 int j, j1, k, k0, k_check, kind, leftright, m2, m5, nbits; local
212 * log10(x) = log(x) / log(10)
213 * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
214 * log10(&d) = (i-Bias)*log(2)/log(10) + log10(d2)
216 * This suggests computing an approximation k to log10(&d) by
218 * k = (i - Bias)*0.301029995663981
221 * We want k to be too large rather than too small.
229 * (We could get a more accurate k by invoking log10,
244 k = (int)ds;
245 if (ds < 0. && ds != k)
246 k--; /* want k = floor(ds) */
256 if (k >= 0 && k <= Ten_pmax) {
257 if (dval(&d) < tens[k])
258 k--;
270 if (k >= 0) {
272 s5 = k;
273 s2 += k;
276 b2 -= k;
277 b5 = -k;
310 i = ndigits + k + 1;
329 && k == 0
341 k0 = k;
344 if (k > 0) {
345 ds = tens[k&0xf];
346 j = k >> 4;
361 if ( (j1 = -k) !=0) {
374 k--;
375 dval(&d) *= 10.;
408 dval(&eps) *= 10.;
409 dval(&d) *= 10.;
416 for(i = 1;; i++, dval(&d) *= 10.) {
438 k = k0;
444 if (be >= 0 && k <= Int_max) {
446 ds = tens[k];
453 for(i = 1;; i++, dval(&d) *= 10.) {
484 k++;
583 k--;
584 b = multadd(b, 10, 0); /* we botched the k estimate */
586 mhi = multadd(mhi, 10, 0);
594 k = -1 - ndigits;
601 k++;
614 mhi = Balloc(mhi->k);
656 mhi1 = multadd(mhi, 10, 0);
660 b = multadd(b, 10, 0);
700 b = multadd(b, 10, 0);
702 mlo = mhi = multadd(mhi, 10, 0);
704 mlo = multadd(mlo, 10, 0);
705 mhi = multadd(mhi, 10, 0);
714 b = multadd(b, 10, 0);
736 k++;
759 *decpt = k + 1;