On Mon, May 12, 2014 at 4:54 AM, Mark H Harris <harrismh...@gmail.com> wrote: > The following code will produce over 100,000 digits of π (pi) in less than 2 > seconds on a low-end processor, like my mac mini dual core 2Ghz: > >>julia> prec=524288 >>524288 > >>julia> with_bigfloat_precision(prec) do >> println(atan(BigFloat(1)/5)*16 - atan(BigFloat(1)/239)*4) >> end
Would it be quicker (and no less accurate) to represent pi as atan(BigFloat(1))*4 instead? That's how I originally met a pi-calculation (as opposed to "PI = 3.14" extended to however much accuracy someone cared to do). ChrisA -- https://mail.python.org/mailman/listinfo/python-list