Lines Matching defs:bits
63 static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int pok)
74 int emax = -emin-bits+3;
143 if (lrp==dc && dc<10 && (bits>30 || x[0]>>bits==0))
170 int bitlim = bits-3*(int)(rp-9);
196 /* Upscale until desired number of bits are left of radix point */
223 /* Downscale until exactly number of bits are left of radix point */
257 /* Assemble desired bits into floating point variable */
266 if (bits > LDBL_MANT_DIG+e2-emin) {
267 bits = LDBL_MANT_DIG+e2-emin;
268 if (bits<0) bits=0;
272 /* Calculate bias term to force rounding, move out lower bits */
273 if (bits < LDBL_MANT_DIG) {
274 bias = copysignl(scalbn(1, 2*LDBL_MANT_DIG-bits-1), y);
275 frac = fmodl(y, scalbn(1, LDBL_MANT_DIG-bits));
293 if (LDBL_MANT_DIG-bits >= 2 && !fmodl(frac, 1))
302 if (denormal && bits==LDBL_MANT_DIG+e2-emin)
314 static long double hexfloat(FILE *f, int bits, int emin, int sign, int pok)
408 if (bits > 32+e2-emin) {
409 bits = 32+e2-emin;
410 if (bits<0) bits=0;
413 if (bits < LDBL_MANT_DIG)
414 bias = copysignl(scalbn(1, 32+LDBL_MANT_DIG-bits-1), sign);
416 if (bits<32 && y && !(x&1)) x++, y=0;
430 int bits;
436 bits = FLT_MANT_DIG;
437 emin = FLT_MIN_EXP-bits;
440 bits = DBL_MANT_DIG;
441 emin = DBL_MIN_EXP-bits;
444 bits = LDBL_MANT_DIG;
445 emin = LDBL_MIN_EXP-bits;
501 return hexfloat(f, bits, emin, sign, pok);
506 return decfloat(f, c, bits, emin, sign, pok);