Square root any nonnegative number, then the principal square root of −"x" is The right side (as well as its negative) is indeed a square root of −"x", since For every non-zero complex number "z" there exist precisely two numbers "w" such that : the principal square root of "z" (defined below), and its negative. There are two complex numbers that square to a given arbitrary non-zero imaginary number formula_11 with real formula_12 where the two-digit pattern {3, 6} repeats over and over again in the partial denominators. Since , the above is also identical to the following generalized continued fractions: The
Integer square root theoretical advantages. One can prove that formula_30 is the largest possible number for which the stopping criterion ensures formula_32 in the algorithm above. In implementations which use number formats that cannot represent all rational numbers exactly (for example, floating point), a stopping constant less than one should be used to protect against roundoff errors. The traditional pen-and-paper algorithm for computing the square root formula_5 is based on working from higher digit places to lower, and as each new digit pick the largest that will still yield a square formula_34. If stopping after the one's place, the result computed will be