Floating-Point Arithmetic & Number Representation

the unit roundoff

If machine epsilon is the width of one step in the floating-point grid near 1, the unit roundoff is essentially HALF that step — the worst error you can suffer when you round a real number to its nearest machine neighbour. Round-to-nearest can only ever miss by at most half a gap, so this half-step is the natural unit in which all rounding-error bounds are stated.

Formally, with round-to-nearest the unit roundoff is u = (1/2) * 2^(1-p) = 2^(-p), where p is the number of significand bits. In double precision u = 2^(-53) ~ 1.11 * 10^(-16); in single u = 2^(-24) ~ 5.96 * 10^(-8). Its defining role is the standard model of arithmetic: every basic operation satisfies fl(x op y) = (x op y)(1 + delta) with |delta| <= u. In words, each add, subtract, multiply or divide is exact up to a relative perturbation no larger than u.

From this one bound flows the whole edifice of error analysis. Chain n operations and the relative errors roughly accumulate, giving worst-case bounds like n*u (often the realistic, statistically averaged growth is more like sqrt(n)*u). It also sets the accuracy ceiling: combined with conditioning, the rule of thumb is forward relative error is about (condition number) * u, so a problem with condition number 10^8 in double (u ~ 10^(-16)) loses about 8 of its 16 digits no matter how careful the algorithm. Unit roundoff is the smallest brick; conditioning decides how big a tower of error those bricks build.

Summing n positive doubles one after another has a worst-case relative error bound of about (n-1)*u; for n = 10^6 that is about 10^6 * 1.1e-16 ~ 1e-10, so you might lose roughly 6 of your 16 digits — which is exactly why Kahan compensated summation, holding the lost low-order bits, is worth using for long sums.

u bounds each operation; conditioning scales the final error.

Unit roundoff (u = 2^(-p)) and machine epsilon (often 2^(1-p), one whole step) differ by a factor of 2 in many references — and some sources call u itself 'machine epsilon'. The CONCEPT is the same; always check which constant a paper or library uses.

Also called
unit round-offurounding unit單位捨入誤差