Optimizing a bignum library for fun
Austin Z. Henley
Associate Teaching Professor
Carnegie Mellon University
7/9/2024I'm down a rabbit hole of learning how bignums work. In the first post, making a bignum library for fun, I implemented a arbitrary-precision number library with some basic operations. You can follow along with the source on GitHub.
int main() {
BigNum a, b, sum;
bignum_init(&a, "12345678901234567890");
bignum_init(&b, "98765432109876543210");
bignum_add(&sum, &a, &b);
bignum_print(&sum);
bignum_free(&a);
bignum_free...
Read more at austinhenley.com