WJM

C++ Big Int Class

For when 18,446,744,073,709,551,615 just isn't big enough

The purpose

There comes a time in ever young C++ programmer's development career in which they realize, "the numbers I can use just aren't big enough for this." This problem certainly happened for me quite a big during programming/math challenges like the Purple Comet exam and Project Euler problems; and honestly I was sick of it. I decided to take destiny into my own hands and write a class that solved this issue.

What's so cool about this?

Using C++ vectors, each individual digit was stored as an char in an "int" vector. While not incredibly efficient in terms of storage, it worked for my needs. From here I implemented every basic math function literally from the ground up; digit based addition, semi-repeated addition for multiplication, etc. Since everything was digit based, whenever I built a new function, I could only use the functions I had already wrote prior as groundwork. All of this coupled together makes this one of the projects I am most proud of.

Check it out on Github!