Lines Matching +full:10 +full:k
41 * to determine k = floor(log10(d)). We scale relevant
42 * quantities using O(log2(k)) rather than O(k) multiplications.
62 * the correctly rounded result. For k requested digits and
64 * something like 10^(k-15) that we must resort to the Long
119 j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, local
215 * log10(x) = log(x) / log(10)
216 * ~=~ log(1.5)/log(10) + (x-1.5)/(1.5*log(10))
217 * log10(&d) = (i-Bias)*log(2)/log(10) + log10(&d2)
219 * This suggests computing an approximation k to log10(&d) by
221 * k = (i - Bias)*0.301029995663981
224 * We want k to be too large rather than too small.
232 * (We could get a more accurate k by invoking log10,
257 k = (int)ds;
258 if (ds < 0. && ds != k)
259 k--; /* want k = floor(ds) */
261 if (k >= 0 && k <= Ten_pmax) {
262 if (dval(&d) < tens[k])
263 k--;
275 if (k >= 0) {
277 s5 = k;
278 s2 += k;
281 b2 -= k;
282 b5 = -k;
321 i = ndigits + k + 1;
340 k0 = k;
343 if (k > 0) {
344 ds = tens[k&0xf];
345 j = k >> 4;
359 else if (( j1 = -k )!=0) {
371 k--;
372 dval(&d) *= 10.;
402 dval(&eps) *= 10.;
403 dval(&d) *= 10.;
410 for(i = 1;; i++, dval(&d) *= 10.) {
432 k = k0;
438 if (be >= 0 && k <= Int_max) {
440 ds = tens[k];
447 for(i = 1;; i++, dval(&d) *= 10.) {
482 k++;
587 k--;
588 b = multadd(b, 10, 0); /* we botched the k estimate */
590 mhi = multadd(mhi, 10, 0);
598 k = -1 - ndigits;
603 k++;
616 mhi = Balloc(mhi->k);
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);
720 b = multadd(b, 10, 0);
742 k++;
776 *decpt = k + 1;