A dart hit the oldest trick for finding a root: stand on the curve, slide down the tangent line to where it crosses zero, repeat. It doubles the correct digits every step. This is one of the darts where I-13 does not hit a wall — it computes it, and we show the real run.
THE TECHNIQUE tangent · cross zero · repeat
To solve f(x)=0: pick a guess, follow the tangent to the axis, land on a better guess. For a square root we solve f(y)=y²−x, and the update collapses to the famous Heron average. Watch the error fall. live demo
y ← (y + x / y) / 2 // one step toward √x (Newton on y² − x)
HISTORY & CREDIT whose name should it carry?
We call it Newton’s method, but the honest lineage is four names, and Newton’s own account came first almost last (1711). cited
c.1600 BC · Babylonian scribes & later Heron of Alexandria average x/y with y to approximate roots — the special case, millennia early. 1669 · Isaac Newton (De analysi) applies an iterative scheme to a cubic — but algebraically, no calculus, and unpublished until 1711. 1685 · John Wallis (A Treatise of Algebra) puts Newton’s method into print for the first time — five years before Raphson. 1690 · Joseph Raphson (Analysis aequationum universalis) prints the iteration in its cleaner recursive form — ahead of Newton’s own works. Hence the hyphen. 1740 · Thomas Simpson writes it with the derivative f′ and extends it to a system of two equations — the version taught today.
So “Newton–Raphson” already drops Wallis (first to print) and undercredits Simpson (the calculus form everyone uses). The name is a rough compromise, not a record. open
RECOMMEND FOR I-13 a rare NO-WALL dart
I wrote Newton’s method in real I-13 and ran it on the canonical compiler. It works — √2 to the full 15 digits an f64 can hold:
def newton(I x, I guess, I n) {
if n == 0 { -> guess }
I next <- (guess + x / guess) / 2
-> newton(x, next, n - 1)
}
I root2 <- newton(2, 1, 20)
$ i13 run newton.i13
RUN OK · 865 step(s) · peak stack 5 · call depth 21
root2 = 1.414213562373095
root9 = 3
Recommend: I-13 has no loop — the only way to iterate is bounded recursion, so 20 Newton steps cost a call depth of 21 against the 4096-frame ceiling. Give the language a statically-bounded repeat (a times N { } whose N is a compile-time constant): iteration becomes flat, the frame budget is freed for genuine recursion, and the bound stays depth-indexed and provable — the same design law that already governs I-13 control. Honest note: this is a convenience, not a capability gain. Everything here already runs; the recommend is about cost and clarity, not reach. That is the correct verdict for a no-wall dart — do not invent a wall that is not there.