Determining interval for the square root using Heron's Algorithm.

247 Views Asked by At

My question is about using prescaling for Heron's Algorithm as described in on page 4 in this textbook: http://assets.press.princeton.edu/chapters/s9487.pdf

I am able to understand that we are limiting our solution only to nonnegative numbers since we are searching for real roots. But I do not follow why this textbook has chosen the interval of $[\frac{1}{2}, 2]$ and the corresponding transformation of $$\tilde{y} = 4^k y$$ if $y\not\in[\frac{1}{2},2]$ for some integer $k$. Both the transformation and the interval appear arbitrarily chosen and I am wondering how to generalize and understand the scaling for other values and since the remainder of the chapter seems to require understanding this transformation.

1

There are 1 best solutions below

2
On BEST ANSWER

Heron's algorithm converges quadratically, but only if your start value is not far away from the true root (in relative terms). By applying the algorithm to numbers $y$ in the interval $\bigl[{1\over2},2]$ and starting with $x_0=1$ we make sure that ${x_0/\sqrt{y}}$ is pretty close to $1$.

If the start value $x_0$ is (relatively) far away from the true root then during the first steps of the algorithm the relative error is only halved (and not squared) at each step (see page $6$ of the text). The suggested prescaling (which is for free in binary) allows to start right away with a "sensible" approximation to the true root.