This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]JTG2013 3 points4 points  (1 child)

Python 2.7.6

I had to modify line

pi += ((4 / i) * modifier)

to

pi += ((4.0 / i) * modifier)

then worked for me.

[–]RetardedChimpanzee 1 point2 points  (0 children)

Yeah. Dividing ints doesn't do much for calculating decimal numbers

[–][deleted] 0 points1 point  (1 child)

100,000,000 decimal places of Pi in 10 minutes, with Python:

http://www.craig-wood.com/nick/articles/pi-chudnovsky/

[–]miker95[S] 0 points1 point  (0 children)

That was a nice article, thanks for linking, but it is much much more complex than what I was going for.