Lines Matching refs:q
1573 mp_digit q; in mp_count_bits() local
1584 q = a->dp[a->used - 1]; in mp_count_bits()
1585 while (q > ((mp_digit) 0)) { in mp_count_bits()
1587 q >>= ((mp_digit) 1); in mp_count_bits()
1634 mp_int ta, tb, tq, q; in mp_div() local
1656 if ((res = mp_init_multi(&ta, &tb, &tq, &q, NULL)) != MP_OKAY) { in mp_div()
1673 ((res = mp_add(&q, &tq, &q)) != MP_OKAY)) { in mp_div()
1687 mp_exch(c, &q); in mp_div()
1695 mp_clear_multi(&ta, &tb, &tq, &q, NULL); in mp_div()
1717 mp_int q, x, y, t1, t2; in mp_div() local
1738 if ((res = mp_init_size (&q, a->used + 2)) != MP_OKAY) { in mp_div()
1741 q.used = a->used + 2; in mp_div()
1787 ++(q.dp[n - t]); in mp_div()
1805 q.dp[i - t - 1] = ((((mp_digit)1) << DIGIT_BIT) - 1); in mp_div()
1813 q.dp[i - t - 1] = (mp_digit) (tmp & (mp_word) (MP_MASK)); in mp_div()
1821 q.dp[i - t - 1] = (q.dp[i - t - 1] + 1) & MP_MASK; in mp_div()
1823 q.dp[i - t - 1] = (q.dp[i - t - 1] - 1) & MP_MASK; in mp_div()
1830 if ((res = mp_mul_d (&t1, q.dp[i - t - 1], &t1)) != MP_OKAY) { in mp_div()
1842 if ((res = mp_mul_d (&y, q.dp[i - t - 1], &t1)) != MP_OKAY) { in mp_div()
1866 q.dp[i - t - 1] = (q.dp[i - t - 1] - 1UL) & MP_MASK; in mp_div()
1878 mp_clamp (&q); in mp_div()
1879 mp_exch (&q, c); in mp_div()
1894 LBL_Q:mp_clear (&q); in mp_div()
2181 mp_int q; in mp_reduce_2k_l() local
2184 if ((res = mp_init(&q)) != MP_OKAY) { in mp_reduce_2k_l()
2191 if ((res = mp_div_2d(a, p, &q, a)) != MP_OKAY) { in mp_reduce_2k_l()
2196 if ((res = mp_mul(&q, d, &q)) != MP_OKAY) { in mp_reduce_2k_l()
2201 if ((res = s_mp_add(a, &q, a)) != MP_OKAY) { in mp_reduce_2k_l()
2211 mp_clear(&q); in mp_reduce_2k_l()
2291 mp_int q; in mp_reduce() local
2295 if ((res = mp_init_copy (&q, x)) != MP_OKAY) { in mp_reduce()
2300 mp_rshd (&q, um - 1); in mp_reduce()
2304 if ((res = mp_mul (&q, mu, &q)) != MP_OKAY) { in mp_reduce()
2309 if ((res = s_mp_mul_high_digs (&q, mu, &q, um)) != MP_OKAY) { in mp_reduce()
2313 if ((res = fast_s_mp_mul_high_digs (&q, mu, &q, um)) != MP_OKAY) { in mp_reduce()
2326 mp_rshd (&q, um + 1); in mp_reduce()
2334 if ((res = s_mp_mul_digs (&q, m, &q, um + 1)) != MP_OKAY) { in mp_reduce()
2339 if ((res = mp_sub (x, &q, x)) != MP_OKAY) { in mp_reduce()
2345 mp_set (&q, 1); in mp_reduce()
2346 if ((res = mp_lshd (&q, um + 1)) != MP_OKAY) { in mp_reduce()
2349 if ((res = mp_add (x, &q, x)) != MP_OKAY) { in mp_reduce()
2362 mp_clear (&q); in mp_reduce()