= Arbitrary-precision integer arithmetic
<Arbitrary-precision integer arithmetic> performs exact <addition>, <subtraction>, <multiplication>, and <integer> <division> using as many machine words as the value requires. A typical representation stores a sign and digits in base $2^w$, with each digit occupying one machine word. Carries propagate between words just as in written decimal arithmetic.
For example, $2^{1000}+1$ can be stored exactly even when a single machine <integer> has only $64$ bits. The attainable size is limited by memory and execution time, rather than a fixed numeric range. The cost grows with the number of <bits>, so an arithmetic operation on a large value cannot automatically be counted as constant time.
Back to article page