Live data from Hacker News

Calculating a record-breaking 31.4T digits of Pi with GCP

cloud.google.com

81–90 of 118 posts

Re: Calculating a record-breaking 31.4T digits of Pi with GCP

#82

Alexander Yee's writeup is interesting – CPU utilisation was only about 12%, they encountered quite nasty I/O bottlenecks (particularly for writes.) http://www.numberworld.org/blogs/2019_3_14_pi_record/ Contradicts the Google blog a little, especially where he points out that they hit performance issues with live migration (Google said it worked fine without impact on the application.)

He's also the author of one of the most famous Stack Overflow answers of all time, 'Why is it faster to process a sorted array than an unsorted array?'

https://stackoverflow.com/a/11227902/1760335

Re: Calculating a record-breaking 31.4T digits of Pi with GCP

#83

Meh, throwing raw power at the problem is not that impressive. Bellard's [1] 2009 record was much more impressive, because he used a clever formula to break the existing record with a mere (albeit beefy) desktop computer: https://bellard.org/pi/pi2700e9/ The record he broke with his desktop PC was made using a supercomputer cluster. [1] If somebody is not familiar with him, he is also the original author of QEMU, ffm…

According to the FAQ, the bottleneck on this process was hard disk speed, would running the algorithm today be noticeably faster on a NVME SSD? Could it be modified to run on a computer with a sufficient amount of RAM, perhaps in batches?

Have there been other improvements in single-core clock speeds, multi-core performance, or any other CPU hardware components to make running this noticeably faster on high-end consumer hardware?

Re: Calculating a record-breaking 31.4T digits of Pi with GCP

#84

Earlier quoted context omitted.

In short 40 is already crazy too many digits for most if not all applications. Yet in the original article they say «Granted, most scientific applications don’t need π beyond a few hundred digits, …». Is there scientific applications where they would really need more than 40? Or is it just the author making some guess?

The linked NASA article points out that with 40 digits of pi you could compute the circumference of the visible universe to an accuracy equal to the diameter of a hydrogen atom. I'm gonna say there's no practical application that would require even 40 digits, never mind a few hundred

You need more digits than that to accurately compute double-precision trigonometric functions (if the input is close to pi, you need enough accurate digits left after performing range reduction).

This paper claims you need 2/pi accurate to 1144 bits which is about 345 decimal digits: https://www.csee.umbc.edu/~phatak/645/supl/Ng-ArgReduction.p...

Re: Calculating a record-breaking 31.4T digits of Pi with GCP

#85
post #19

Earlier quoted context omitted.

Offset and a length in Pi are not going to be shorter than original data to transmit.

Not necessarily. A double gets you pretty far into pi for a cost of just 8 bytes. A little bit of rounding, or checksumming, or other tomfoolery in principle should make it possible to reach absurdly far into pi for a byte or two more.

Given that I personally have to have seen this proposal at least a dozen times myself, and I'm not even particularly "in the field", if it was as easy as people supposed, we'd be using it.

I will point out you're thinking of it incorrectly, though. The challenge with compression isn't to "reach far into pi". The challenge is to reach correctly into pi. A double can identify 2^64 places to reach into pi. It doesn't really matter how you specify those 2^64 locations, that's all it can do, by the simple argument that one double can't specify more than one location.

The location of the US Constitution in pi may be "far", but it's not the "far" we have in our fuzzy human brains where things sort of logarithmically just pile together until there's no meaningful difference to us humans between the 1,839,837,237,938,739,837,954th position of pi and the 1,839,827,237,938,739,837,954th position. But a compression algorithm off by that much is useless; indeed, even being off by one digit (in your choice of base) is going to produce garbage. So it's not just about being able to reach "far", it's about being able to reach far and precisely. It doesn't matter how you arrange the possible 2^64 locations a machine word can point to; specify it as 1,739,837,237,938,739,837,954 + the binary as a 64-bit int for all it matters. That reaches "far" into pi. But you won't find anything useful enough to pay off the 64bits you spent getting there.

(I mean, you want to reach far into Pi, I give you "Go BusyBeaver(64-bit int) digits into Pi". That's reaching in pretty darned far. But it's still useless as a compression algorithm, even with the mighty power of BusyBeaver there.)

(Amusingly, at BB(42) digits into Pi, you get "42" as the next digits, proving that 42 really is the answer. Prove me wrong!)

Re: Calculating a record-breaking 31.4T digits of Pi with GCP

#86
Whenever I see the ridiculous number of places to which pi has been calculated, I wonder if anyone has checked to see if there is a repeating pattern. I mean, 31 trillion places leaves a lot of possibilities for repetition of a couple of billion digits.

Or is my understanding of what constitutes an irrational number outdated? Is there another definition that precludes even looking for repetition in hopes of finding a denominator?

Re: Calculating a record-breaking 31.4T digits of Pi with GCP

#87
post #86

Whenever I see the ridiculous number of places to which pi has been calculated, I wonder if anyone has checked to see if there is a repeating pattern. I mean, 31 trillion places leaves a lot of possibilities for repetition of a couple of billion digits. Or is my understanding of what constitutes an irrational number outdated? Is there another definition that precludes even looking for repetition in hopes of finding a…

Pi can be proven to be an irrational number: https://en.wikipedia.org/wiki/Proof_that_%CF%80_is_irrationa...

Re: Calculating a record-breaking 31.4T digits of Pi with GCP

#88
post #70

Meh, throwing raw power at the problem is not that impressive. Bellard's [1] 2009 record was much more impressive, because he used a clever formula to break the existing record with a mere (albeit beefy) desktop computer: https://bellard.org/pi/pi2700e9/ The record he broke with his desktop PC was made using a supercomputer cluster. [1] If somebody is not familiar with him, he is also the original author of QEMU, ffm…

I struggle to see any complexity into google approach - unlike bellard's one that is an amazing feat. They basically pulled more machine to compute more. nothing really impressive. pretty much any dev with that computing power could have done it

It's fairly impressive.

Keeping a single server online for 111 days straight at full CPU and RAM usage over 96 cores and 1.4TB of RAM is a good start. The fact that such a machine exists is already mind-blowing. Then add 25 more nodes running iSCSI, all out 24/7 for 111 days. Hell, just mounting 240TB on a single system is a good stunt, go ahead and try it and let me know it's not "complex".

And your last point kind of IS the point of their marketing: any dev could do it if they have the skill, and they'll rent you the hardware.

Re: Calculating a record-breaking 31.4T digits of Pi with GCP

#89
post #66

Are the some PI-like constants, but much harder to calculate? Like even a million digits would be hard to calculate?

That's actually most numbers, but we don't know any yet. https://youtu.be/5TkIe60y2GI numberphile (math YouTube series) describing some related concepts here.

Re: Calculating a record-breaking 31.4T digits of Pi with GCP

#90
post #86

Whenever I see the ridiculous number of places to which pi has been calculated, I wonder if anyone has checked to see if there is a repeating pattern. I mean, 31 trillion places leaves a lot of possibilities for repetition of a couple of billion digits. Or is my understanding of what constitutes an irrational number outdated? Is there another definition that precludes even looking for repetition in hopes of finding a…

Not consecutively repeating patterns.

But if you take any length pattern of digits, it would repeat an infinite number of times.

Let's take a one digit pattern, say '5'. Since the digits of pi continue forever, there would be an infinite number of '5's.

Now consider a longer pattern '53'. Since the digits of pi continue forever, there would be an infinite number of '53's. In fact, each 53 will be from one of the infinite number of '5's in the previous pattern '5'.

Now consider a longer pattern '537' . . .

. . . to continue . . .

It was long ago when I read Contact (the book), so I hope I don't misremember this too badly. At the end of the book the main character was given a budget, lab, resources, etc. They were working on looking for a message in the digits of Pi. Eventually her beeper beeped and they had found one! It must be woven into the fabric of the universe.

I think any sequence of digits that had any kind of message you are going to eventually find in Pi. Just like, if you look long enough you'll find a 5. If you keep looking you'll eventually find a 53. Keep looking, you'll eventually find a 537. Etc.

Post reply on HN