Lines Matching refs:mantissa

612 	unsigned int baseline, mantissa, exponent;  in pl2303_encode_baud_rate_divisor()  local
622 mantissa = baseline / baud; in pl2303_encode_baud_rate_divisor()
623 if (mantissa == 0) in pl2303_encode_baud_rate_divisor()
624 mantissa = 1; /* Avoid dividing by zero if baud > 32*12M. */ in pl2303_encode_baud_rate_divisor()
626 while (mantissa >= 512) { in pl2303_encode_baud_rate_divisor()
628 mantissa >>= 2; /* divide by 4 */ in pl2303_encode_baud_rate_divisor()
632 mantissa = 511; in pl2303_encode_baud_rate_divisor()
639 buf[1] = exponent << 1 | mantissa >> 8; in pl2303_encode_baud_rate_divisor()
640 buf[0] = mantissa & 0xff; in pl2303_encode_baud_rate_divisor()
643 baud = (baseline / mantissa) >> (exponent << 1); in pl2303_encode_baud_rate_divisor()
651 unsigned int baseline, mantissa, exponent; in pl2303_encode_baud_rate_divisor_alt() local
661 mantissa = baseline / baud; in pl2303_encode_baud_rate_divisor_alt()
662 if (mantissa == 0) in pl2303_encode_baud_rate_divisor_alt()
663 mantissa = 1; /* Avoid dividing by zero if baud > 32*12M. */ in pl2303_encode_baud_rate_divisor_alt()
665 while (mantissa >= 2048) { in pl2303_encode_baud_rate_divisor_alt()
667 mantissa >>= 1; /* divide by 2 */ in pl2303_encode_baud_rate_divisor_alt()
671 mantissa = 2047; in pl2303_encode_baud_rate_divisor_alt()
678 buf[1] = (exponent & ~0x01) << 4 | mantissa >> 8; in pl2303_encode_baud_rate_divisor_alt()
679 buf[0] = mantissa & 0xff; in pl2303_encode_baud_rate_divisor_alt()
682 baud = (baseline / mantissa) >> exponent; in pl2303_encode_baud_rate_divisor_alt()