This algorithm is used in y-cruncher as well. It is the "defacto" method of computing square roots. Essentially, the algorithm consists of a recursive relation:
where
Time Complexity: O(n log(n))
This algorithm is used for validation. It requires less mathematical operations, just multiplication, addition and subtraction. It goes like this:
- Start with a pair
$\left\langle 5M, 5 \right\rangle$ , where$M$ is the number to square root. - Let the pair be equivalent to
$\left\langle P,Q \right\rangle$ .- If
$P\geq{Q}$ , then the next sequence in the pair is$\left\langle P-Q, Q+10\right\rangle$ - Otherwise, the next sequence is
$\left\langle 100P,10Q-45\right\rangle$
- If
Convergence is quadratic, however the formula below is accurate for giving the amount of terms needed to give a certain amount of precision
For example,
Time Complexity: Don't know yet.
Algorithm 2:
"A Spigot-Algorithm for Square-Roots: Explained and Extended" Goldberg, Mayer. 2023 Dec 23 doi:10.48550/arXiv.2312.15338