Re: first X digits of pi

2012-04-13 Thread Jabba Laci
Hi, Thanks for the answers. Gibbons' algorithm (from 2006) is a nice way to generate the digits one after the other. However, it can get slow. The mpmath approach is very fast, I think I will use that one. In a script you can get the value of pi as a string with str(mp.pi) Best, Laszlo On Fri,

Re: first X digits of pi

2012-04-13 Thread Tichodroma
Hi, Am 13.04.2012 12:51, schrieb Jabba Laci: I'd like to work with the digits of pi. Perhaps this solution from 2006 can help you: http://mail.python.org/pipermail/edu-sig/2006-July/006810.html Tichodroma -- XMPP: tichodr...@jabber.ccc.de IRC: Tichodroma -- http://mail.python.org/mailman/lis

first X digits of pi

2012-04-13 Thread Jabba Laci
Hi, I'd like to work with the digits of pi. I would need high precision, like 100,000 digits or even more. At the moment I download the necessary data from the web (http://newton.ex.ac.uk/research/qsystems/collabs/pi/) and parse it. I just wonder: is there a more elegant way? I found a Perl soluti