Hello again,
While working on the assignment, it turned out that its actually the numbers that can be infinite not the length of the chain. So I might be multiplying digits that are larger than what a variable can hold. Ive been looking through the Karatsuba method and Schönhage-Strassen algorithm for multiplication but I was unable to find any algorithms like that in C. Perhaps someone knows of any algorithms for multiplication, division, addition, or subtraction?
Second question: Is there a way to access the L1 and L2 cache and use a tiny bit of it for an operation? So as to speed up the program?
Thank you!