Vocabulary
benchmark.find-pi

Inputs
accuracyan object


Outputs
nan object
approxan object


Definition


:: find-pi-to ( accuracy -- n approx )
1 4 [
over [ 2 * 1 + ] [ odd? [ neg ] when ] bi 4 swap /
[ + ] keep abs accuracy >= [ 1 + ] 2dip
] loop ;