From: Jay Anderson Date: 2009-04-30T12:02:15+09:00 Subject: Re: Digits of Pi (#202) > ## Digits of Pi (#202) > > This week's quiz is to write a Ruby program that can compute the first > 100,000 digits of pi. Attached is a solution using a machin formula (http://en.wikipedia.org/wiki/Machin-like_formula) translated into ruby from here: http://en.literateprograms.org/Category:Pi_with_Machin%27s_formula. $ time ruby pi.rb 100000 > pi.txt real 1m44.592s user 1m44.339s sys 0m0.212s No effort has been made to optimize, but it seems to have a reasonable running time. -----Jay Attachments: http://www.ruby-forum.com/attachment/3635/pi.rb -- Posted via http://www.ruby-forum.com/.