Home | History | Annotate | Download | only in Support

Lines Matching refs:qp

1544     //     Set qp = (u[j+n]*b + u[j+n-1]) / v[n-1]. (qp=qprime=q')
1546 // Now test if qp == b or qp*v[n-2] > b*rp + u[j+n-2]; if so, decrease
1547 // qp by 1, inrease rp by v[n-1], and repeat this test if rp < b. The test
1549 // value qp is one too large, and it eliminates all cases where qp is two
1553 uint64_t qp = dividend / v[n-1];
1555 if (qp == b || qp*v[n-2] > b*rp + u[j+n-2]) {
1556 qp--;
1558 if (rp < b && (qp == b || qp*v[n-2] > b*rp + u[j+n-2]))
1559 qp--;
1561 DEBUG(dbgs() << "KnuthDiv: qp == " << qp << ", rp == " << rp << '\n');
1564 // (u[j+n]u[j+n-1]..u[j]) - qp * (v[n-1]...v[1]v[0]). This computation
1570 uint64_t subtrahend = uint64_t(qp) * uint64_t(v[i]);
1608 // D5. [Test remainder.] Set q[j] = qp. If the result of step D4 was
1610 q[j] = (unsigned)qp;