w = DIGIT(a, ix) + DIGIT(b, ix) + k;
w = (mp_word)DIGIT(a, ix) + DIGIT(b, ix) + k;
mp_err   s_mp_add(mp_int *a, mp_int *b)        /* magnitude addition      */{  mp_word   w, k = 0;  mp_size   ix;  mp_err    res;  /* Make sure a has enough precision for the output value */  if((USED(b) > USED(a)) && (res = s_mp_pad(a, USED(b))) != MP_OKAY)    return res;  /*    Add up all digits up to the precision of b.  If b had initially    the same precision as a, or greater, we took care of it by the    padding step above, so there is no problem.  If b had initially    less precision, we'll have to make sure the carry out is duly    propagated upward among the higher-order digits of the sum.   */  for(ix = 0; ix < USED(b); ix++) {    w = DIGIT(a, ix) + DIGIT(b, ix) + k;    DIGIT(a, ix) = ACCUM(w);    k = CARRYOUT(w);  }  /* If we run out of 'b' digits before we're actually done, make     sure the carries get propagated upward...     */  while(k && ix < USED(a)) {    w = DIGIT(a, ix) + k;    DIGIT(a, ix) = ACCUM(w);    k = CARRYOUT(w);    ++ix;  }  /* If there's an overall carry out, increase precision and include     it.  We could have done this initially, but why touch the memory     allocator unless we're sure we have to?   */  if(k) {    if((res = s_mp_pad(a, USED(a) + 1)) != MP_OKAY)      return res;    DIGIT(a, ix) = k;  }  return MP_OKAY;} /* end s_mp_add() */