◄ WORLD V · SONNY 5DART 360 · a helldive at the net

THE BABYLONIAN METHOD average a guess with what it divides — the oldest algorithm, four thousand years on

To find √S: guess x, and if x is too big then S/x is too small — so average them and repeat: x → (x + S/x)/2. The true root sits exactly between a guess and its quotient, so the average always improves, converging on the fixed point where x = S/x. It is on Babylonian clay tablets (YBC 7289 gives √2 = 1;24,51,10 — three sexagesimal places, about six decimal digits — c. 1800 BCE) — the oldest numerical algorithm we have — and it is exactly Newton's method (dart 359) on x²−S, three and a half thousand years early.

THE TECHNIQUE x → (x + S/x)/2; a guess averaged with its quotient

The demo runs the Babylonian average for √2 from a crude guess — the fixed point where x = 2/x: live demo


HISTORY & CREDIT Babylon c.1800 BCE · Heron c.60 CE

“Square roots need a modern algorithm.” — a clay tablet had √2 to about six decimal digits by averaging a guess with its quotient. The oldest algorithm is a fixed-point iteration. cited

c.1800 BCE · Babylonian scribes — tablet YBC 7289: √2 ≈ 1.41421 in base 60.
c.60 CE · Heron of Alexandria — described the averaging method (hence “Heron's method”).
the same map · identical to Newton on x²−S — a fixed-point iteration, three millennia before calculus.

A guess and its quotient straddle the root; their average closes in. The oldest algorithm, still a fixed point. Babylon / Heron

RECOMMEND FOR I-13 the oldest algorithm, on the compiler

On the canonical compiler, the Babylonian average from 1 reaches √2 = 1.4142135… — the same fixed point as dart 358, four thousand years older:

$ i13 run f_babylonianmethod.i13 # x -> (x + 2/x)/2, from 1 RUN OK · 372 step(s) · peak stack 4 · call depth 21 sqrt2 = 1.414213562373095 -- the fixed point x = 2/x, on a clay tablet c.1800 BCE
Recommend: the Babylonian method is the fixed point at its oldest — a guess averaged with its quotient, four thousand years before the word ‘algorithm’ — and i13 runs it to √2. Not a keeper (it is dart 358's convergence with a date on it), but the dart that shows the still point was found by counting long before it was named by calculus.