длинная-арифметика

Error in Karatsuba's algorithm for Long Arithmetic

I'm trying to make a library with long numbers. And there was a problem that I had been trying to fix for a week. The problem ... late the product in 2 ways ( that is, I will first add a1b1 and 2 method a2b2), then in any case I will get the wrong answer.

Implementation of a class of large numbers with long arithmetic

I am writing a class for large numbers up to 2^512 in length. I use the unsigned __int64 array. The addition of numbers is in ... c = t % LLONG_MAX; res.number[i] = c; } res.number[7] = t; return res; } };