gonzui


Format: Advanced Search

SearchGoogle itResults 1 - 1 of 1 for funcall:dval from t2ex/bsd_source/lib/libc/src_bsd/stdlib/gdtoa.c (0.00 seconds)
t2ex
bsd_source/lib/libc/src_bsd/stdlib/gdtoa.c - 31.0KB - 829 lines
205: 
206:         dval(&d) = b2d(b, &i);
207:         i = be + bbits - 1;
211: if ( (j = 11 - hi0bits(word0(&d) & Frac_mask)) !=0) 212: dval(&d) /= 1 << j; 213: #endif
239: #endif 240: ds = (dval(&d)-1.5)*0.289529654602168 + 0.1760912590558 + i*0.301029995663981; 241:
254: if ( (j1 = j & 3) !=0) 255: dval(&d) *= 1 << j1; 256: word0(&d) += j << Exp_shift - 2 & Exp_mask;
260: if (k >= 0 && k <= Ten_pmax) { 261: if (dval(&d) < tens[k]) 262: k--;
341: i = 0; 342: d2 = dval(&d); 343: #ifdef IBM 344: if ( (j = 11 - hi0bits(word0(&d) & Frac_mask)) !=0) 345: dval(&d) /= 1 << j; 346: #endif
355: j &= Bletch - 1; 356: dval(&d) /= bigtens[n_bigtens-1]; 357: ieps++;
367: if ( (j1 = -k) !=0) { 368: dval(&d) *= tens[j1 & 0xf]; 369: for(j = j1 >> 4; j; j >>= 1, i++)
371: ieps++; 372: dval(&d) *= bigtens[i]; 373: }
375: } 376: if (k_check && dval(&d) < 1. && ilim > 0) { 377: if (ilim1 <= 0)
380: k--; 381: dval(&d) *= 10.; 382: ieps++; 383: } 384: dval(&eps) = ieps*dval(&d) + 7.; 385: word0(&eps) -= (P-1)*Exp_msk1;
387: S = mhi = 0; 388: dval(&d) -= 5.; 389: if (dval(&d) > dval(&eps)) 390: goto one_digit; 391: if (dval(&d) < -dval(&eps)) 392: goto no_digits;
399: */ 400: dval(&eps) = ds*0.5/tens[ilim-1] - dval(&eps); 401: for(i = 0;;) { 402: L = (Long)(dval(&d)/ds); 403: dval(&d) -= L*ds; 404: *s++ = '0' + (int)L; 405: if (dval(&d) < dval(&eps)) { 406: if (dval(&d)) 407: inex = STRTOG_Inexlo;
409: } 410: if (ds - dval(&d) < dval(&eps)) 411: goto bump_up;
413: break; 414: dval(&eps) *= 10.; 415: dval(&d) *= 10.; 416: }
420: /* Generate ilim digits, then fix them up. */ 421: dval(&eps) *= tens[ilim-1]; 422: for(i = 1;; i++, dval(&d) *= 10.) { 423: if ( (L = (Long)(dval(&d)/ds)) !=0) 424: dval(&d) -= L*ds; 425: *s++ = '0' + (int)L;
427: ds *= 0.5; 428: if (dval(&d) > ds + dval(&eps)) 429: goto bump_up; 430: else if (dval(&d) < ds - dval(&eps)) { 431: if (dval(&d)) 432: inex = STRTOG_Inexlo;
442: s = s0; 443: dval(&d) = d2; 444: k = k0;
454: S = mhi = 0; 455: if (ilim < 0 || dval(&d) <= 5*ds) 456: goto no_digits;
458: } 459: for(i = 1;; i++, dval(&d) *= 10.) { 460: L = dval(&d) / ds; 461: dval(&d) -= L*ds; 462: #ifdef Check_FLT_ROUNDS 463: /* If FLT_ROUNDS == 2, L will usually be high by 1 */ 464: if (dval(&d) < 0) { 465: L--; 466: dval(&d) += ds; 467: }
469: *s++ = '0' + (int)L; 470: if (dval(&d) == 0.) 471: break;
478: } 479: dval(&d) += dval(&d); 480: #ifdef ROUND_BIASED 481: if (dval(&d) >= ds) 482: #else 483: if (dval(&d) > ds || (dval(&d) == ds && L & 1)) 484: #endif