Home | History | Annotate | Download | only in Support

Lines Matching full:dividend

57 std::pair<uint32_t, int16_t> ScaledNumbers::divide32(uint32_t Dividend,
59 assert(Dividend && "expected non-zero dividend");
62 // Use 64-bit math and canonicalize the dividend to gain precision.
63 uint64_t Dividend64 = Dividend;
80 std::pair<uint64_t, int16_t> ScaledNumbers::divide64(uint64_t Dividend,
82 assert(Dividend && "expected non-zero dividend");
94 return std::make_pair(Dividend, Shift);
96 // Maximize size of dividend.
97 if (int Zeros = countLeadingZeros(Dividend)) {
99 Dividend <<= Zeros;
103 uint64_t Quotient = Dividend / Divisor;
104 Dividend %= Divisor;
107 while (!(Quotient >> 63) && Dividend) {
108 // Shift Dividend and check for overflow.
109 bool IsOverflow = Dividend >> 63;
110 Dividend <<= 1;
115 if (IsOverflow || Divisor <= Dividend) {
117 Dividend -= Divisor;
121 return getRounded(Quotient, Shift, Dividend >= getHalf(Divisor));