Lines Matching refs:value
379 static comp_t encode_comp_t(unsigned long value) in encode_comp_t() argument
384 while (value > MAXFRACT) { in encode_comp_t()
385 rnd = value & (1 << (EXPSIZE - 1)); /* Round up? */ in encode_comp_t()
386 value >>= EXPSIZE; /* Base 8 exponent == 3 bit shift. */ in encode_comp_t()
393 if (rnd && (++value > MAXFRACT)) { in encode_comp_t()
394 value >>= EXPSIZE; in encode_comp_t()
402 exp += value; /* and add on the mantissa. */ in encode_comp_t()
421 static comp2_t encode_comp2_t(u64 value) in encode_comp2_t() argument
425 exp = (value > (MAXFRACT2>>1)); in encode_comp2_t()
427 while (value > MAXFRACT2) { in encode_comp2_t()
428 rnd = value & 1; in encode_comp2_t()
429 value >>= 1; in encode_comp2_t()
436 if (rnd && (++value > MAXFRACT2)) { in encode_comp2_t()
437 value >>= 1; in encode_comp2_t()
445 return (value & (MAXFRACT2>>1)) | (exp << (MANTSIZE2-1)); in encode_comp2_t()
454 static u32 encode_float(u64 value) in encode_float() argument
459 if (value==0) return 0; in encode_float()
460 while ((s64)value > 0){ in encode_float()
461 value <<= 1; in encode_float()
464 u = (u32)(value >> 40) & 0x7fffffu; in encode_float()