◀ THE FOLD0ROOT.AI // WORLD II · GLITCH · DIVIDE BY ZERO◆ .dlw.fold
THE FOLD / GLITCH / DIVIDE BY ZERO / THE WINDING NUMBER

THE WINDING NUMBER

counting roots by counting turns
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Walk a closed loop in the complex plane, feed every point through a polynomial, and watch where the output goes. Count how many times that output curve wraps around the origin — just accumulate the angle and divide by 2π. That count is the number of roots inside your loop, multiplicity included. No root-finding, no algebra: you learn how many solutions are in a region by counting turns. This is the argument principle, and it is what root-finders use to decide where to look.

LIT verified live: z³−1 gives winding 3.0000000000 around |z|=2 and 7.07e-17 around |z|=0.5; (z−0.3)²(z+0.6) gives 3 inside |z|=1 — counting the double root twice — and 2 inside |z|=0.4, where only the double root lies; an ellipse enclosing the same three roots returns 3 again; and nine radii from 0.2 to 5.0 return 0,0,0,0,3,3,3,3,3, every one an exact integer, stepping only where the contour crosses the roots.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) seated this at DIVIDE BY ZERO: the winding number is defined by an angle about a point, and it is exactly the point where the angle is undefined that the whole construction is measuring.

AVAN (AI) notes what makes this a genuinely different kind of answer. Every numerical root-finder produces approximate roots and then has to decide whether a number near the boundary is inside or out. The argument principle returns an integer and no such decision is required — the accumulated angle is 3.0000000000 or it is 7.07e-17, never 2.6. That robustness has a precise price: it tells you how many and refuses to tell you where. Split the region and ask again to find out. The values here were computed with 4,000 contour samples, and the multiplicity result is the one worth dwelling on: a double root is genuinely two roots to this method, which is a statement about the polynomial and not an artefact of the counting.
3 ONE DIMENSION
Nine radii. The count steps only where the contour crosses a root.
4 TWO DIMENSIONS · INTERACTIVE
Grow the contour and watch the image curve pick up another loop.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the image curve, wrapping the origin once per enclosed root.
AVAN’s addition (the inverse-companion): the forward reading is “counting turns counts roots.” The inverse is that the integer is bought by discarding position, and the discard is what makes it exact. An approximate root near a boundary forces a judgement call; a winding number cannot be near anything, because the set it lives in has no nearby values. Read backwards, this is the trade every topological method makes — it converts a question with a continuum of possible wrong answers into one with a discrete set of possible right ones, and the price is always the same: you may ask how many and you may not ask which.
LIT z^3-1 gives winding 3.0000000000 around |z|=2 and 7.07e-17 around |z|=0.5; (z-0.3)^2(z+0.6) gives 3 inside |z|=1, counting the double root twice, and 2 inside |z|=0.4 where only the double root lies; an ellipse enclosing the same three roots returns 3 again; and nine radii from 0.2 to 5.0 return 0,0,0,0,3,3,3,3,3, every one an exact integer, stepping only where the contour crosses the roots

FIG What makes this a different kind of answer: every numerical root-finder produces APPROXIMATE roots and then must decide whether a number near the boundary is inside or out. The argument principle returns an integer and no such decision is required - the accumulated angle is 3.0000000000 or 7.07e-17, never 2.6. That robustness has a precise price: it tells you HOW MANY and refuses to tell you WHERE. Computed with 4,000 contour samples. The multiplicity result is worth dwelling on: a double root is genuinely two roots to this method, a statement about the polynomial rather than an artefact of the counting.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of DIVIDE BY ZERO · David Lee Wise (ROOT0), with AVAN