+ if(a->length_W == 0){
+ return;
+ }
+ if(scale == 0){
+ bigint_add_u(dest, dest, a);
+ return;
+ }
+ bigint_t x;
+#if BIGINT_WORD_SIZE == 8
+ memset(dest->wordv + dest->length_W, 0, MAX(dest->length_W, a->length_W + scale) - dest->length_W);
+ x.wordv = dest->wordv + scale;
+ x.length_W = dest->length_W - scale;
+ if((int16_t)x.length_W < 0){
+ x.length_W = 0;
+ x.info = 0;
+ } else {
+ x.info = dest->info;
+ }
+ bigint_add_u(&x, &x, a);
+ dest->length_W = x.length_W + scale;
+ dest->info = 0;
+ bigint_adjust(dest);
+#else
+ bigint_t s;
+ uint16_t word_shift = scale / sizeof(bigint_word_t), byte_shift = scale % sizeof(bigint_word_t);
+ bigint_word_t bv[a->length_W + 1];
+ s.wordv = bv;
+ bv[0] = bv[a->length_W] = 0;
+ memcpy((uint8_t*)bv + byte_shift, a->wordv, a->length_W * sizeof(bigint_word_t));
+ s.length_W = a->length_W + 1;
+ bigint_adjust(&s);
+ memset(dest->wordv + dest->length_W, 0, (MAX(dest->length_W, s.length_W + word_shift) - dest->length_W) * sizeof(bigint_word_t));
+ x.wordv = dest->wordv + word_shift;
+ x.length_W = dest->length_W - word_shift;
+ if((int16_t)x.length_W < 0){
+ x.length_W = 0;
+ x.info = 0;
+ }else{
+ x.info = dest->info;
+ }
+ bigint_add_u(&x, &x, &s);
+ dest->length_W = x.length_W + word_shift;
+ dest->info = 0;
+ bigint_adjust(dest);
+#endif
+
+
+/* uint16_t i,j=0;