code: function addShift_(x, y, ys) {
    var i, c, k, kk;
    k=x.length<ys+y.length ? x.length : ys+y.length;
    kk=x.length;
    for (c=0, i=ys; i<k; i++) {
      c+=x[i]+y[i-ys];
      x[i]=c & mask;
      c>>=bpe;
    }
    for (i=k; c && i<kk; i++) {
      c+=x[i];
      x[i]=c & mask;
      c>>=bpe;
    }
  }
docs: do x=x+(y<<(ys*bpe)) for bigInts x and y, and integers a,b and ys. x must be large enough to hold the answer.