Lines Matching refs:value
315 static comp_t encode_comp_t(unsigned long value) in encode_comp_t() argument
320 while (value > MAXFRACT) { in encode_comp_t()
321 rnd = value & (1 << (EXPSIZE - 1)); /* Round up? */ in encode_comp_t()
322 value >>= EXPSIZE; /* Base 8 exponent == 3 bit shift. */ in encode_comp_t()
329 if (rnd && (++value > MAXFRACT)) { in encode_comp_t()
330 value >>= EXPSIZE; in encode_comp_t()
340 exp += value; /* and add on the mantissa. */ in encode_comp_t()
359 static comp2_t encode_comp2_t(u64 value) in encode_comp2_t() argument
363 exp = (value > (MAXFRACT2>>1)); in encode_comp2_t()
365 while (value > MAXFRACT2) { in encode_comp2_t()
366 rnd = value & 1; in encode_comp2_t()
367 value >>= 1; in encode_comp2_t()
374 if (rnd && (++value > MAXFRACT2)) { in encode_comp2_t()
375 value >>= 1; in encode_comp2_t()
383 return (value & (MAXFRACT2>>1)) | (exp << (MANTSIZE2-1)); in encode_comp2_t()
392 static u32 encode_float(u64 value) in encode_float() argument
397 if (value == 0) in encode_float()
399 while ((s64)value > 0) { in encode_float()
400 value <<= 1; in encode_float()
403 u = (u32)(value >> 40) & 0x7fffffu; in encode_float()