• Home
  • Raw
  • Download

Lines Matching refs:carry

55     mpd_uint_t carry = 0;  in _mpd_baseadd()  local
62 s = u[i] + (v[i] + carry); in _mpd_baseadd()
63 carry = (s < u[i]) | (s >= MPD_RADIX); in _mpd_baseadd()
64 w[i] = carry ? s-MPD_RADIX : s; in _mpd_baseadd()
67 for (; carry && i < m; i++) { in _mpd_baseadd()
68 s = u[i] + carry; in _mpd_baseadd()
69 carry = (s == MPD_RADIX); in _mpd_baseadd()
70 w[i] = carry ? 0 : s; in _mpd_baseadd()
77 return carry; in _mpd_baseadd()
88 mpd_uint_t carry = 0; in _mpd_baseaddto() local
95 s = w[i] + (u[i] + carry); in _mpd_baseaddto()
96 carry = (s < w[i]) | (s >= MPD_RADIX); in _mpd_baseaddto()
97 w[i] = carry ? s-MPD_RADIX : s; in _mpd_baseaddto()
100 for (; carry; i++) { in _mpd_baseaddto()
101 s = w[i] + carry; in _mpd_baseaddto()
102 carry = (s == MPD_RADIX); in _mpd_baseaddto()
103 w[i] = carry ? 0 : s; in _mpd_baseaddto()
115 mpd_uint_t carry; in _mpd_shortadd() local
122 carry = (s < v) | (s >= MPD_RADIX); in _mpd_shortadd()
123 w[0] = carry ? s-MPD_RADIX : s; in _mpd_shortadd()
126 for (i = 1; carry && i < m; i++) { in _mpd_shortadd()
127 s = w[i] + carry; in _mpd_shortadd()
128 carry = (s == MPD_RADIX); in _mpd_shortadd()
129 w[i] = carry ? 0 : s; in _mpd_shortadd()
132 return carry; in _mpd_shortadd()
140 mpd_uint_t carry = 1; in _mpd_baseincr() local
146 for (i = 0; carry && i < n; i++) { in _mpd_baseincr()
147 s = u[i] + carry; in _mpd_baseincr()
148 carry = (s == MPD_RADIX); in _mpd_baseincr()
149 u[i] = carry ? 0 : s; in _mpd_baseincr()
152 return carry; in _mpd_baseincr()
220 mpd_uint_t carry = 0; in _mpd_shortmul() local
228 lo = carry + lo; in _mpd_shortmul()
229 if (lo < carry) hi++; in _mpd_shortmul()
231 _mpd_div_words_r(&carry, &w[i], hi, lo); in _mpd_shortmul()
233 w[i] = carry; in _mpd_shortmul()
246 mpd_uint_t carry; in _mpd_basemul() local
252 carry = 0; in _mpd_basemul()
258 lo = carry + lo; in _mpd_basemul()
259 if (lo < carry) hi++; in _mpd_basemul()
261 _mpd_div_words_r(&carry, &w[i+j], hi, lo); in _mpd_basemul()
263 w[j+m] = carry; in _mpd_basemul()
313 mpd_uint_t carry; in _mpd_basedivmod() local
362 carry = 0; in _mpd_basedivmod()
367 lo = carry + lo; in _mpd_basedivmod()
368 if (lo < carry) hi++; in _mpd_basedivmod()
373 carry = (u[i+j] < x); in _mpd_basedivmod()
374 u[i+j] = carry ? x+MPD_RADIX : x; in _mpd_basedivmod()
375 carry += hi; in _mpd_basedivmod()
379 if (carry) { in _mpd_basedivmod()
566 mpd_uint_t carry; in _mpd_shortadd_b() local
573 carry = (s < v) | (s >= b); in _mpd_shortadd_b()
574 w[0] = carry ? s-b : s; in _mpd_shortadd_b()
577 for (i = 1; carry && i < m; i++) { in _mpd_shortadd_b()
578 s = w[i] + carry; in _mpd_shortadd_b()
579 carry = (s == b); in _mpd_shortadd_b()
580 w[i] = carry ? 0 : s; in _mpd_shortadd_b()
583 return carry; in _mpd_shortadd_b()
591 mpd_uint_t carry = 0; in _mpd_shortmul_c() local
599 lo = carry + lo; in _mpd_shortmul_c()
600 if (lo < carry) hi++; in _mpd_shortmul_c()
602 _mpd_div_words_r(&carry, &w[i], hi, lo); in _mpd_shortmul_c()
605 return carry; in _mpd_shortmul_c()
614 mpd_uint_t carry = 0; in _mpd_shortmul_b() local
622 lo = carry + lo; in _mpd_shortmul_b()
623 if (lo < carry) hi++; in _mpd_shortmul_b()
625 _mpd_div_words(&carry, &w[i], hi, lo, b); in _mpd_shortmul_b()
628 return carry; in _mpd_shortmul_b()