Concept

Floating point

The way computers store real numbers: a fixed number of significant binary digits and an exponent. Every operation rounds to the nearest representable value, so long calculations can lose accuracy through cancellation even when each step is correct.

Named by 4 essays across 4 fields — each of them below, with the objects they name alongside it.

The orbit a computer draws, and the orbit. Two orbits of the tent map from the same starting fraction plotted against the step number — one computed exactly in whole-number arithmetic and periodic, one computed in double precision and reaching zero.

The orbit a computer draws

A chaotic orbit computed in floating point is not the orbit of the point it started from. Sometimes it is the true orbit of a nearby point, which is enough; sometimes the arithmetic simply runs out, and the picture is of the rounding.

dynamics · Iteration
Four ways to a slope, and the one that subtracts. f'(1.5)=4.053427893898620; forward best 2.60e-9 at h=1.0e-8; central best 6.41e-12 at h=3.2e-6; complex step at 1e-200: 1.00e-17; dual: 1.00e-17.

A slope without a subtraction

The definition of a slope subtracts two nearly equal numbers and divides by a tiny one, and a computer that follows it loses half its digits however carefully the step is chosen. Two pieces of arithmetic avoid the subtraction altogether. Step sideways into the complex numbers by 10⁻²⁰⁰ and read off the imaginary part; or calculate with numbers a + bε in which ε² = 0, and the slope rides along exactly. Run backwards, the second gives all thousand slopes of a function of a thousand variables for under five times the cost of the function.

analysis · The derivative
A flow that climbs for ever and falls short. 0:p0 +1.000000 → 1.000000; 1:p1 +0.618034 → 1.618034; 2:p2 +0.618034 → 2.236068; 3:p1 +0.381966 → 2.618034; 4:p3 +0.381966 → 3.000000; 5:p1 +0.236068 → 3.236068; 6:p2 +0.236068 → 3.472136; 7:p1 +0.145898 → 3.618034; 8:p3 +0.145898 → 3.763932; maximum 5.

A search for room that never ends

The textbook way to find the most that a network can carry is to find any route that still has room, push as much along it as it will take, and repeat until no route has room left. With whole-number capacities that must stop. Give one road a capacity of 0.618…, the golden ratio's reciprocal, and choose the routes badly, and it never stops: every push is positive, the flow converges, and it converges to 4.236 when the network can carry 5. The same choice made carelessly in floating point does stop — because of rounding, at the wrong answer, convinced it has finished.

discrete · Network flow
A bracket that shrinks by the golden ratio. 2: [0.00000, 1.00000]; 3: [0.00000, 0.61803]; 4: [0.23607, 0.61803]; 5: [0.23607, 0.47214]; 6: [0.32624, 0.47214]; 7: [0.32624, 0.41641]; 8: [0.36068, 0.41641]; 9: [0.36068, 0.39512]; peak 0.374750.

The search that reuses a point

To find the peak of a function that rises and then falls, evaluate it at two points and throw away the part beyond the lower one. Place the points so that the survivor can be used again, and there is exactly one way to do it: at the golden ratio. Each new evaluation then shrinks the bracket to 0.618 of its width, and with a fixed number of evaluations nothing does better than Fibonacci's numbers.

geometry · Golden ratio

Named alongside it

The objects these essays reach for when they reach for this one.

Golden ratioAdjointAlgorithmBinary expansionCapacityChain ruleComplex numbersCutDerivativeDifference quotientExact arithmeticFibonacci numbers

All concepts