http://www.perlmonks.org?node_id=805810


in reply to pi and some continued fractions

Btw, if you could use bignum here, its bpi function would make this easy:
perl -Mbignum=bpi -e 'print bpi(1000)'