Lines Matching refs:small
2146 * Compare the data of big and small. This function does the equivalent
2147 * of first shifting small to the left and then comparing the data of
2148 * big and small, except that no allocation for the left shift is needed.
2151 _mpd_basecmp(mpd_uint_t *big, mpd_uint_t *small, mpd_size_t n, mpd_size_t m,
2172 _mpd_divmod_pow10(&h, &lprev, small[m--], MPD_RDIGITS-r);
2178 _mpd_divmod_pow10(&h, &l, small[m], MPD_RDIGITS-r);
2188 CMP_EQUAL_OR_RETURN(big[m+q], small[m])
2681 const mpd_t *big = a, *small = b;
2694 small = a;
2702 for (i = 0; i < small->len-1; i++) {
2703 x = small->data[i];
2718 /* most significant word of small */
2719 x = small->data[i];
2757 result->len = _mpd_real_size(result->data, small->len);
2872 const mpd_t *big = a, *small = b;
2885 small = a;
2893 for (i = 0; i < small->len-1; i++) {
2894 x = small->data[i];
2909 /* most significant word of small */
2910 x = small->data[i];
2971 MPD_NEW_STATIC(small,0,0,0,0);
3022 if (mpd_qshiftr(&small, a, rshift, status) == MPD_UINT_MAX) {
3026 _mpd_qadd(result, &big, &small, ctx, status);
3032 mpd_del(&small);
3191 const mpd_t *big = a, *small = b;
3204 small = a;
3212 for (i = 0; i < small->len-1; i++) {
3213 x = small->data[i];
3228 /* most significant word of small */
3229 x = small->data[i];
3338 const mpd_t *big, *small;
3348 big = a; small = b;
3349 if (big->exp != small->exp) {
3350 if (small->exp > big->exp) {
3351 _mpd_ptrswap(&big, &small);
3358 if (mpd_adjexp(small) < exp) {
3360 * Avoid huge shifts by substituting a value for small that is
3363 * adjexp(small) < exp if and only if:
3391 mpd_copy_flags(&tiny, small);
3395 tiny.data[0] = mpd_iszerocoeff(small) ? 0 : 1;
3396 small = &tiny;
3399 shift = big->exp - small->exp;
3407 result->exp = small->exp;
3411 if (big->len < small->len) {
3412 _mpd_ptrswap(&big, &small);
3423 carry = _mpd_baseadd(result->data, big->data, small->data,
3424 big->len, small->len);
3438 if (big->len == small->len) {
3440 if (big->data[i] != small->data[i]) {
3441 if (big->data[i] < small->data[i]) {
3442 _mpd_ptrswap(&big, &small);
3450 _mpd_basesub(result->data, big->data, small->data,
3451 big->len, small->len);
5900 const mpd_t *big = a, *small = b;
5914 if (small->len > big->len) {
5915 _mpd_ptrswap(&big, &small);
5918 rsize = big->len + small->len;
5921 _mpd_singlemul(result->data, big->data[0], small->data[0]);
5926 _mpd_mul_2_le2(rbuf, big->data, small->data, small->len);
5930 if (small->len == 1) {
5931 _mpd_shortmul(rbuf, big->data, big->len, small->data[0]);
5934 _mpd_basemul(rbuf, small->data, big->data, small->len, big->len);
5947 if (small->len <= 256) {
5950 if (small->len == 1) {
5951 _mpd_shortmul(rdata, big->data, big->len, small->data[0]);
5954 _mpd_basemul(rdata, small->data, big->data, small->len, big->len);
5959 rdata = _mpd_kmul(big->data, small->data, big->len, small->len, &rsize);
5962 rdata = _mpd_fntmul(big->data, small->data, big->len, small->len, &rsize);
5965 rdata = _mpd_kmul_fnt(big->data, small->data, big->len, small->len, &rsize);
5983 result->exp = big->exp + small->exp;
7535 * inexact result is fixed by a small loop, using at most one iteration.