Motivation [00PS]

In many situations, when we use arithmetic operations on integers such as addition or multiplication, we simply assume they take constant time. This is appropriate when the integers are bounded by some fixed size, e.g. if all the integers are 64-bit integers. However, if we want to be able to deal with integers of arbitrary size, this is no longer appropriate; we must take the size of the integers into account. For example, as of October 20, 2026, the largest known prime number is 2^{136\,279\,841} - 1, a number with 41\,024\,320 decimal digits. The arithmetic operations needed to test this number for primality take a nontrivial amount of time!