Get the latest tech news

Making a Bignum Library for Fun


How do computer handle really, really big numbers? Let's find out.

I had an initial theory of how bignums work: treat numbers as strings and manually perform arithmetic on the digits as you would on a piece of paper. First, we determine how many digits the result might be by taking the size of the bigger number and adding 1. It starts by determining the upper bound of how many digits the multiplication could produce and allocates them with zeroed values.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Fun

Fun

Photo of bignum library

bignum library

Related news:

News photo

NVIDIA Open Kernel Driver News, AMD EPYC 4004 & Linux 6.10 Made For A Fun May

News photo

Users poke fun at Discord rebrand and question why it happened

News photo

Kaplay – a JavaScript library that helps you make games fast and fun