You mentioned 3 steps give 171 digits accuracy, 4 steps show 694 digits precision in nodejs, see comment of this blog posting:

https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/Pi_day_GatewayScript_use_of_decimal_js_arbitrary_precision_decimal_library?lang=en#threadid=10979cbd-c978-4d57-98d9-829b3e90a352

anyway im interested in learning this algorithm but, since i am in highschool, i have a limited source of study material from the school maths textbook and i can not teach my self this algorithm, so could someone explain it to me? ]]>

a0 corresponds to an initial estimate of pi of 2.914… which is correct in 0 decimal places. I realize that the choice of y0 is linked to the choice of a0, but the details of how you might choose a better starting point. I guess, since a single iteration gets you to 9 correct digits, it doesn’t matter too much in practice.

]]>