Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
100,000,000 million places of π in just under 10 minutes (with Python) (craig-wood.com)
41 points by reidrac on Oct 8, 2011 | hide | past | favorite | 10 comments


The mention of python in this is somewhat foolish from a performance standpoint. It's not that python is slowing them down or speeding things up...they ultimately are hooking into a pile of C code to get "c-comparable" performance. If you're going to be using numpy or gmpy, don't bother comparing your python code to C, its meaningless...

That all said, that's mostly irrelevant! The algorithm is new, kinda neat, and efficient, which is what matters.


Am I mistaken, or in the final graph, aren't only the last two lines gmpy and c?


It's 100 million, not 100 million million.


Agreed, but note that the original webpage actually states: > So we have achieved our goal of calculating 100,000,000 million places of π in just under 10 minutes!

Thus it's not entirely the submitter's fault. But they should check what they're typing/copy-pasting! :)

Which is too bad, because I wanted to know how they were calculating 100 trillion digits in less than ten minutes . . .


You're right, I shouldn't have copied the typo! :)


Are pi digits useful for anything? Maybe some encryption technique or random number generation? Are the digits of pi easier or harder to generate than other irrational numbers?


Are the digits of pi easier or harder to generate than other irrational numbers?

The best known algorithms for computing Pi takes O(M(n) log n) time, where M(n) is the time required for an n-digit multiplication (approximately O(n log n) using an FFT).

This makes Pi harder than algebraic numbers -- all algebraics can be computed in O(M(n)) time -- and no easier than any other elementary function -- all elementary functions can be computed in O(M(n) log n) time.

There are a few numbers for which the current best known algorithm is slower than Pi, but the only interesting one is Euler's gamma, at O(M(n) (log n)^2).


This is really interesting and I've never seen it laid out like that. Can you recommend a reference?


The best book I know on this topic is Pi and the AGM: http://www.amazon.com/AGM-Computational-Complexity-Mathemati...


Here's Pi to 5 trillion digits

http://ja0hxv.calico.jp/pai/estart.html




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: