+ if(a->length_B == 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_B, 0, MAX(dest->length_B, a->length_B + scale) - dest->length_B);
+ x.wordv = dest->wordv + scale;
+ x.length_B = dest->length_B - scale;
+ if((int16_t)x.length_B < 0){
+ x.length_B = 0;
+ x.info = 0;
+ } else {
+ x.info = dest->info;
+ }
+ bigint_add_u(&x, &x, a);
+ dest->length_B = x.length_B + 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_B + 1];
+ s.wordv = bv;
+ bv[0] = bv[a->length_B] = 0;
+ memcpy((uint8_t*)bv + byte_shift, a->wordv, a->length_B * sizeof(bigint_word_t));
+ s.length_B = a->length_B + 1;
+ bigint_adjust(&s);
+ memset(dest->wordv + dest->length_B, 0, (MAX(dest->length_B, s.length_B + word_shift) - dest->length_B) * sizeof(bigint_word_t));
+ x.wordv = dest->wordv + word_shift;
+ x.length_B = dest->length_B - word_shift;
+ if((int16_t)x.length_B < 0){
+ x.length_B = 0;
+ x.info = 0;
+ }else{
+ x.info = dest->info;
+ }
+ bigint_add_u(&x, &x, &s);
+ dest->length_B = x.length_B + word_shift;
+ dest->info = 0;
+ bigint_adjust(dest);
+#endif
+
+
+/* uint16_t i,j=0;