2 ms·
It is more readable. But I wanted to stick close to the general formula [1], so that you see what's going on. It would probably have been better to write it as
by eru 16y ago
It is more readable. But I wanted to stick close to the general formula [1], so that you see what's going on. It would probably have been better to write it as:
y = 2
average x1 x2 = (x1 + x2) / 2
next x = average (y/x + x)
It's just a co-incidence that I chose y as 2.
[1] Heron's Method (http://en.wikipedia.org/wiki/Herons_method#Babylonian_method http://en.wikipedia.org/wiki/Herons_method#Babylonian_method)