Lines Matching refs:bsize

2700     Py_ssize_t bsize = ABS(Py_SIZE(b));
2721 if (asize > bsize) {
2727 asize = bsize;
2728 bsize = i;
2746 if (2 * asize <= bsize)
2750 shift = bsize >> 1;
2763 * 1. Allocate result space (asize + bsize digits: that's always
2779 ret = _PyLong_New(asize + bsize);
2870 bsize = c(bsize/2) + f(bsize/2).
2871 2. shift = f(bsize/2)
2872 3. asize <= bsize
2873 4. Since we call k_lopsided_mul if asize*2 <= bsize, asize*2 > bsize in this
2874 routine, so asize > bsize/2 >= f(bsize/2) in this routine.
2876 We allocated asize + bsize result digits, and add t3 into them at an offset
2877 of shift. This leaves asize+bsize-shift allocated digit positions for t3
2878 to fit into, = (by #1 and #2) asize + f(bsize/2) + c(bsize/2) - f(bsize/2) =
2879 asize + c(bsize/2) available digit positions.
2881 bh has c(bsize/2) digits, and bl at most f(size/2) digits. So bh+hl has
2882 at most c(bsize/2) digits + 1 bit.
2884 If asize == bsize, ah has c(bsize/2) digits, else ah has at most f(bsize/2)
2885 digits, and al has at most f(bsize/2) digits in any case. So ah+al has at
2886 most (asize == bsize ? c(bsize/2) : f(bsize/2)) digits + 1 bit.
2890 c(bsize/2) + (asize == bsize ? c(bsize/2) : f(bsize/2)) digits + 2 bits
2892 and we have asize + c(bsize/2) available digit positions. We need to show
2893 this is always enough. An instance of c(bsize/2) cancels out in both, so
2895 (asize == bsize ? c(bsize/2) : f(bsize/2)) digits + 2 bits. If asize < bsize,
2896 then we're asking whether asize digits >= f(bsize/2) digits + 2 bits. By #4,
2897 asize is at least f(bsize/2)+1 digits, so this in turn reduces to whether 1
2899 asize == bsize, then we're asking whether bsize digits is enough to hold
2900 c(bsize/2) digits + 2 bits, or equivalently (by #1) whether f(bsize/2) digits
2901 is enough to hold 2 bits. This is so if bsize >= 2, which holds because
2902 bsize >= KARATSUBA_CUTOFF >= 2.
2921 Py_ssize_t bsize = ABS(Py_SIZE(b));
2927 assert(2 * asize <= bsize);
2930 ret = _PyLong_New(asize + bsize);
2941 while (bsize > 0) {
2943 const Py_ssize_t nbtouse = MIN(bsize, asize);
2958 bsize -= nbtouse;