Batch Spreadsheet for C Programmers - 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

Cycles and Convergence

Example: Newton's method to find the square root of x:

x = 2;  a0 = b0 ? b0 : x/2;  b0 = (a0+x/a0)/2;
Since a0 depends on b0, and b0 depends on a0, there is a cycle.

Newton's method converges quickly:

ss_eval: converged after 7 iterations

    A                    B
0   1.41421356237309492  1.41421356237309492