Where the iterator for finding square root of two comes from?

probably Newton's Method.

Google is your friend - just type in your question.

There are other iteration methods, like regula falsi and bisection.

The iterator for finding the square root of two is derived from a mathematical algorithm known as the Babylonian method or Heron's method. Here's a step-by-step explanation of the algorithm:

1. Start with an initial guess for the square root of two, let's call it x.

2. Calculate a new guess, let's call it y, by averaging x with the number 2 divided by x: y = (x + 2/x) / 2.

3. Update the value of x with the value of y.

4. Repeat steps 2 and 3 until the value of x converges to the square root of two (or the desired level of accuracy).

The idea behind this method is to continually improve the guess for the square root of two by taking the average of the current guess and the number 2 divided by the guess.

By iterating this process, the value of x gets closer and closer to the square root of two. The algorithm continues until the desired level of accuracy is reached.