By huge numbers, I mean if you took a gigabyte (instead of 4/8 bytes, etc.) and tried to add / subtract / multiply / divide it into some other arbitrarily large (or small) number.
Adding and subtracting is quite simple (one f / m / byte at a time):
out_byteN = a_byteN + b_byteN + overflowBit
For each byte, in this way, I can add / subtract, since I am reading the number from the disk and do not run the risk of running out of RAM.
For multiplication / division, just do it in a loop.
But what about accepting the nth root of a HUGE number?
source share