How does one do math with VERY large numbers?
I was playing around with Desmos, and I came up with this. Obviously, 6.63 x 10^303 is quite a bit larger than a 64 bit unsigned integer. If you had to program a calculator that could handle such large numbers, how would you do it?
Posted May 30, 2017, 5:22 AM UTC
23
You'd use arbitrary-precision integers. Each digit is a machine integer, so that your number can have as many base-2^64 digits as memory can hold.
In addition to that you can combine it with block floating point operations to do arithmetic on arbitrarily large (or small) numbers.