Interval arithmetic is often concerned with large intervals (or, in more than one dimension, rectangular boxes), which can cover an entire region of the number line (or region of space).
Ball arithmetic is a specialized form of interval arithmetic, more concerned with tiny intervals (or balls), meant to contain individual numbers (or points in space).
Suppose for instance that we're calculating the square root of 2, and we find that it's contained in the interval
[1.41421356237309504880168836, 1.41421356237309504880168874].
Since most of the digits are the same, this data can be compressed to about half the size, by specifying the interval's midpoint and radius instead of its two endpoints:
1.41421356237309504880168855 ± 0.00000000000000000000000019
1.41421356237309504880168855 ± 19*10^-26
1.41421356237309504880168855~19
The tilde notation means that the next few digits and the previous few digits have the same place-values (powers of ten). Some people use parentheses instead:
1.41421356237309504880168855(19)
This conflicts with other more common uses of parentheses, and it has one more character than with the tilde.
We can take digits from the midpoint and put them into the radius, e.g. replacing the last part '55~19' with '50~24', thus expanding the interval. The true value of √2 is still enclosed. We can also round up the radius, again expanding the interval. And of course we can add or remove any number of trailing zeros, if it's the same number for both the midpoint and the radius.
1.41421356237309504880168855~19
1.41421356237309504880168850~24
1.41421356237309504880168850~30
1.4142135623730950488016885000~3000
1.4142135623730950488016885~3
We cannot round down the radius, or the true value might escape from the interval:
1.41421356237309504880168850~24
1.41421356237309504880168850~20
[1.41421356237309504880168830, 1.41421356237309504880168870]
Usually, when a number is written without error bounds, such as π = 3.1416, it's implied that the error (i.e. the radius) is no more than 0.5 ULPs (Units in the Last Place):
3.14160~5
[3.14155, 3.14165]
But this lazy approach, not writing the error explicitly, only allows scaling the radius by a power of ten. If we're rounding the radius up and never down, it rapidly leads to loss of precision. For example, suppose we're adding √2+√3+√5, given just a few digits of each:
√2 = 1.4142
√3 = 1.7321
√5 = 2.2361
sum = 5.3824
This result is misleading, since the error is more than 0.00005. You might think we could round it to 5.382, but even that is questionable. Here's what's actually happening:
√2 = 1.41420~5
√3 = 1.73210~5
√5 = 2.23610~5
sum = 5.38240~15
If we throw away the digit 4, then it must be absorbed into the radius:
5.38200~55
Now the radius is greater than 0.0005, so we shouldn't write 5.382. We could throw away two digits:
5.38000~255
5.38000~500
5.380~5
"5.38"
Or we could write the radius explicitly; even a single digit there improves the result by a factor of 25, in this case:
5.38240~15
5.38240~20
5.3824~2