Warning

 

Close

Confirm Action

Are you sure you wish to do this?

Confirm Cancel
BCM
User Panel

Site Notices
Posted: 9/6/2021 7:54:33 AM EDT
Of course, pi is the ratio of the circumference to the diameter of a circle.

We all know that it starts with 3.14159.

But now somebody in Switzerland has calculated pi out to 62.8 trillion places.

My question: In order to calculate the ratio out that far, don't they have to know the circumference and diameter to that many decimal places?

If so, how do they come up with  the circumference and diameter to that many decimal places?

I was taught that the final number in any calculation can be no more accurate than the least accurate measurement used in the calculation.

I.e., if you measure the distance and time it takes you to travel somewhere, and you calculate your average miles per hour (MPH), your MPH number can be no more accurate than the accuracy of your measurement of distance and travel time.

Here is the article.

Obviously, they are NOT simply measuring the circumference and diameter of a circle and calculating the ratio. But if they are doing it mathematically, don't they need the value of pi to calculate the circumference?  And they cannot calculate pi any more accurately than the value they used going in.

Anybody know how they are doing it?
Link Posted: 9/6/2021 8:01:31 AM EDT
[#1]
A type of infinite series that’s been around for several hundred years. Computers are great.
Link Posted: 9/6/2021 8:05:46 AM EDT
[#2]
My understanding was that they don't calculate it directly but rather use convergence techniques.
Link Posted: 9/6/2021 8:10:01 AM EDT
[#3]
The circumference and diameter of a perfect circle always have the same relationship to each other. You wouldn't need to measure any specific circle to any specific... uhh... specificity to calculate that.
Link Posted: 9/6/2021 8:20:02 AM EDT
[#4]
Ohhh, Alexander Yee must be so mad.

He wrote y-cruncher, which for over a decade was by far the fastest pi calculator. He released the program as a benchmarking tool but he then kept his own version for record breaking.

Fun times. I've had a few conversations with him...back in the day you could just email him when he was in college but he has more of a life now.

OP, Google the BBP formula and you can understand how it is calculated. It's also how Pi results are validated.
Link Posted: 9/6/2021 10:02:32 AM EDT
[#5]
All the things going on in the world and people are worried about the wrong kind of pi(e).
Link Posted: 9/6/2021 1:20:53 PM EDT
[#6]
The procedure is pretty straightforward. The actual challenge is computer random access memory (RAM). To merely contain a number 62.8 trillion characters in length as a single addressable value would require very close to 60 terabytes of RAM. Using something like y-cruncher.exe would need something on very near to 280 terabytes of RAM to do the calculation. Since 64bit systems limit out at 256 terabytes we can assume that someone configured a supercomputer with 256TB of RAM and wanted to test that configuration. Calculating pi to extreme lengths is not a practical exercise of mathematics. That value of pi to N digits is only the superficial result. The useful result is it is a way to validate that your system RAM is all functioning even when you have a conspicuously large amount of RAM configured, so large that other methods of testing it become non-viable.
Link Posted: 9/6/2021 1:59:29 PM EDT
[#7]
Pi isn't measured - it is calculated.  Isaac Newton came up with a formula for calculating Pi in the 1600's, which is an infinite power series.  Pi can be calculated to any arbitrary precision by increasing the number of terms calculated - the value of additional terms drops off very quickly, giving very good (but not several trillion digit's worth of good) precision with relatively few terms.  There are also other series used for calculating Pi - the article does not say what series or method is used in the newest record-setting effort.

Mike
Link Posted: 9/6/2021 2:02:27 PM EDT
[#8]
And they say Bitcoin mining is a waste of site resources
Link Posted: 9/6/2021 2:10:57 PM EDT
[#9]
FPNI.
It is covered in the middle of the second year of college calculus.  If you don't have 1.5 years of college calculus well understood, you can't understand what e really is, and how pi, e and trigonometry is all interrelated.  After that 2nd year of calculus, a whole lot of the leadup all makes sense.
Link Posted: 9/6/2021 2:45:39 PM EDT
[#10]
Pie. I wish I could determine pi.
Link Posted: 9/6/2021 3:56:45 PM EDT
[#11]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
My understanding was that they don't calculate it directly but rather use convergence techniques.
View Quote


You crunch out the infinite series that converge on pi.

Pi
Link Posted: 9/6/2021 6:22:33 PM EDT
[#12]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
FPNI.
It is covered in the middle of the second year of college calculus.  If you don't have 1.5 years of college calculus well understood, you can't understand what e really is, and how pi, e and trigonometry is all interrelated.  After that 2nd year of calculus, a whole lot of the leadup all makes sense.
View Quote

I loved calculus--and still do. I feel sorry for folks who never understood calculus.  It describes much of what happens in the world.

I have tutored engineering students in calculus.

In college, I had 13 semester hours of calculus and got A's in every class. I actually got an A+ (a 100 average) for the first semester.

We probably covered the pi series calculation, but that was 56 years ago.

I also had 2 more advanced math courses (differential equations and something mis-named "applied math") after calculus.

Yeah, I finished No. 1 my 1969 Mechanical Engineering class and No. 2 in the whole School of Engineering.
Link Posted: 9/6/2021 6:29:07 PM EDT
[#13]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
OP, Google the BBP formula and you can understand how it is calculated. It's also how Pi results are validated.
View Quote

Thanks. That's interesting.

I will study it more . . .

Link
Link Posted: 9/6/2021 6:33:59 PM EDT
[#14]
2+2=5.
That is all anyone needs to know.
Link Posted: 9/6/2021 6:40:46 PM EDT
[#15]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
The procedure is pretty straightforward. The actual challenge is computer random access memory (RAM). To merely contain a number 62.8 trillion characters in length as a single addressable value would require very close to 60 terabytes of RAM. Using something like y-cruncher.exe would need something on very near to 280 terabytes of RAM to do the calculation. Since 64bit systems limit out at 256 terabytes we can assume that someone configured a supercomputer with 256TB of RAM and wanted to test that configuration. Calculating pi to extreme lengths is not a practical exercise of mathematics. That value of pi to N digits is only the superficial result. The useful result is it is a way to validate that your system RAM is all functioning even when you have a conspicuously large amount of RAM configured, so large that other methods of testing it become non-viable.
View Quote



Who said the whole number has to be stored in ram all at the same time?  Do it like long division in 4th grade.  Take it 1 digit at a time.  Then work your way to the next decimal place.  Rinse and repeat.  You could cache your answer in ram and flush it to disk every 1GB or so.
Link Posted: 9/7/2021 5:05:49 PM EDT
[#16]
Discussion ForumsJump to Quoted PostQuote History
Quoted:



Who said the whole number has to be stored in ram all at the same time?  Do it like long division in 4th grade.  Take it 1 digit at a time.  Then work your way to the next decimal place.  Rinse and repeat.  You could cache your answer in ram and flush it to disk every 1GB or so.
View Quote View All Quotes
View All Quotes
Discussion ForumsJump to Quoted PostQuote History
Quoted:
Quoted:
The procedure is pretty straightforward. The actual challenge is computer random access memory (RAM). To merely contain a number 62.8 trillion characters in length as a single addressable value would require very close to 60 terabytes of RAM. Using something like y-cruncher.exe would need something on very near to 280 terabytes of RAM to do the calculation. Since 64bit systems limit out at 256 terabytes we can assume that someone configured a supercomputer with 256TB of RAM and wanted to test that configuration. Calculating pi to extreme lengths is not a practical exercise of mathematics. That value of pi to N digits is only the superficial result. The useful result is it is a way to validate that your system RAM is all functioning even when you have a conspicuously large amount of RAM configured, so large that other methods of testing it become non-viable.



Who said the whole number has to be stored in ram all at the same time?  Do it like long division in 4th grade.  Take it 1 digit at a time.  Then work your way to the next decimal place.  Rinse and repeat.  You could cache your answer in ram and flush it to disk every 1GB or so.


We wrote a recursive algorithm many decades ago in my CompSci program (using Scheme) that would calculate it forever if you kept it running.  

Used very little memory as it was flushed at each step.
Link Posted: 9/8/2021 9:39:52 PM EDT
[#17]
Discussion ForumsJump to Quoted PostQuote History
Quoted:


We wrote a recursive algorithm many decades ago in my CompSci program (using Scheme) that would calculate it forever if you kept it running.  

Used very little memory as it was flushed at each step.
View Quote View All Quotes
View All Quotes
Discussion ForumsJump to Quoted PostQuote History
Quoted:
Quoted:
Quoted:
The procedure is pretty straightforward. The actual challenge is computer random access memory (RAM). To merely contain a number 62.8 trillion characters in length as a single addressable value would require very close to 60 terabytes of RAM. Using something like y-cruncher.exe would need something on very near to 280 terabytes of RAM to do the calculation. Since 64bit systems limit out at 256 terabytes we can assume that someone configured a supercomputer with 256TB of RAM and wanted to test that configuration. Calculating pi to extreme lengths is not a practical exercise of mathematics. That value of pi to N digits is only the superficial result. The useful result is it is a way to validate that your system RAM is all functioning even when you have a conspicuously large amount of RAM configured, so large that other methods of testing it become non-viable.



Who said the whole number has to be stored in ram all at the same time?  Do it like long division in 4th grade.  Take it 1 digit at a time.  Then work your way to the next decimal place.  Rinse and repeat.  You could cache your answer in ram and flush it to disk every 1GB or so.


We wrote a recursive algorithm many decades ago in my CompSci program (using Scheme) that would calculate it forever if you kept it running.  

Used very little memory as it was flushed at each step.


There are lot of ways to avoid storing the result in ram.
Hard drives up to 18 TB are available for around $400.

It is strictly a matter of time.
A RAID array would eliminate any storage issues.

How much money do you want to spend?

We used to make large arrays of Silicone Graphics Workstations.

I have a hundreds of the straight/cross recess screwdrivers SG included with each machine for connector screws.

If you want to crunch numbers you can throw a couple hundred thousand SG workstations at a problem.
You have to structure the solution so it can easily be somputed by parallel processors.


We made use of 2 port and 4 port memories to build large arrays for temporary storage.
This eliminates the Hwang, Briggs limit.
It revolves around having to share memory between multiple processors.
A one port memory forces the processor to stop while data is moved out of memory to another storage system.
With a dual port memory you can have a separate processor remove and place results onto a disc system while
the computing processor still has access to the memory contents for continued computation.

We also pushed LAN speeds to over 1,000 GB per second when typical LANs ran at 10 GB/sec.

Bleeding edge engineering is green.
The color of money.
Link Posted: 9/8/2021 9:51:22 PM EDT
[#18]
I think that I accidentally clicked on the wrong tab.

My son just started college with a computer engineering major. Now, I’m concerned that I won’t even be able to converse with him, when he comes home.

Carry on smart people, carry on.
Link Posted: 9/9/2021 6:54:12 PM EDT
[#19]
While a trillion (1e12) sounds huge, a trillion bytes is 1 tera byte.


You can get an 18 Terabyte hard drive for around $400.

A RAID setup would be useful here.

It provides redundancy against disk loss.

Link Posted: 9/10/2021 8:12:13 AM EDT
[#20]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
While a trillion (1e12) sounds huge, a trillion bytes is 1 tera byte.


You can get an 18 Terabyte hard drive for around $400.

A RAID setup would be useful here.

It provides redundancy against disk loss.

View Quote


Or increased throughput for swapping into/out of memory.

Keeping it in RAM, at least on a standard machine, is much, MUCH faster.

Anyone else want to calculate 50B digits on their computer to see what the impact is?  Mine maxes out my 256GB, and there are computers with obviously way more than that even. I'd be interested to see what a faster/newer processor with less RAM posts.

ETA: 46 Minutes. Don't even know if that's considered good anymore. Took almost 7 minutes just to allocate the RAM.

Attachment Attached File
Link Posted: 9/12/2021 2:29:34 PM EDT
[#21]
Discussion ForumsJump to Quoted PostQuote History
Quoted:


Or increased throughput for swapping into/out of memory.

Keeping it in RAM, at least on a standard machine, is much, MUCH faster.

Anyone else want to calculate 50B digits on their computer to see what the impact is?  Mine maxes out my 256GB, and there are computers with obviously way more than that even. I'd be interested to see what a faster/newer processor with less RAM posts.

ETA: 46 Minutes. Don't even know if that's considered good anymore. Took almost 7 minutes just to allocate the RAM.

https://www.ar15.com/media/mediaFiles/467079/50B_Digits_png-2085087.JPG
View Quote View All Quotes
View All Quotes
Discussion ForumsJump to Quoted PostQuote History
Quoted:
Quoted:
While a trillion (1e12) sounds huge, a trillion bytes is 1 tera byte.


You can get an 18 Terabyte hard drive for around $400.

A RAID setup would be useful here.

It provides redundancy against disk loss.



Or increased throughput for swapping into/out of memory.

Keeping it in RAM, at least on a standard machine, is much, MUCH faster.

Anyone else want to calculate 50B digits on their computer to see what the impact is?  Mine maxes out my 256GB, and there are computers with obviously way more than that even. I'd be interested to see what a faster/newer processor with less RAM posts.

ETA: 46 Minutes. Don't even know if that's considered good anymore. Took almost 7 minutes just to allocate the RAM.

https://www.ar15.com/media/mediaFiles/467079/50B_Digits_png-2085087.JPG


If you pick the 'correct' series the next point only depends on a very few of the points already computed.
No advantage to keeping it in RAM.

Selection of infinite series that converges on pi.

Pick a sequence that does not require a lot of terms to find the next digit.
Link Posted: 9/12/2021 3:10:35 PM EDT
[#22]
Discussion ForumsJump to Quoted PostQuote History
Quoted:


If you pick the 'correct' series the next point only depends on a very few of the points already computed.
No advantage to keeping it in RAM.

Selection of infinite series that converges on pi.

Pick a sequence that does not require a lot of terms to find the next digit.
View Quote


Are you suggesting that picking said sequence programmatically is the difficult part?

If not, then not sure how your statement could hold true. If swapping into and out of RAM is not a speed penalty than my 4 year old PC could break the record in the matter of weeks.
Link Posted: 9/12/2021 3:48:05 PM EDT
[#23]
pi = 22/7

Close enough

Fight me.

Link Posted: 9/12/2021 6:26:54 PM EDT
[#24]
Discussion ForumsJump to Quoted PostQuote History
Quoted:


Are you suggesting that picking said sequence programmatically is the difficult part?

If not, then not sure how your statement could hold true. If swapping into and out of RAM is not a speed penalty than my 4 year old PC could break the record in the matter of weeks.
View Quote View All Quotes
View All Quotes
Discussion ForumsJump to Quoted PostQuote History
Quoted:
Quoted:


If you pick the 'correct' series the next point only depends on a very few of the points already computed.
No advantage to keeping it in RAM.

Selection of infinite series that converges on pi.

Pick a sequence that does not require a lot of terms to find the next digit.


Are you suggesting that picking said sequence programmatically is the difficult part?

If not, then not sure how your statement could hold true. If swapping into and out of RAM is not a speed penalty than my 4 year old PC could break the record in the matter of weeks.


It is a term of showing a convergence rate to avoid having to use multiple points to find the next point.

It is one of the multiple 'tricks' used to increase throughput in calculations.

As long as each subsequent point has an error bound of less than a few percent
you only need a very few samples held in RAM to compute the next point.
Think about it.
If the convergence rate is better than 1% you only need a couple digits in RAM.
The 'reach back' for carry functions is less than a couple points.
Link Posted: 9/13/2021 7:07:53 AM EDT
[#25]
I'm obviously not a math major, but if you get a possible 1% error on 62,800,000,000,000 iterations, couldn't your final digit calculation be off quite a bit?

Link Posted: 9/13/2021 7:55:28 AM EDT
[#26]
How does one verify that?
Link Posted: 9/17/2021 11:00:40 PM EDT
[#27]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
Ohhh, Alexander Yee must be so mad.

He wrote y-cruncher, which for over a decade was by far the fastest pi calculator. He released the program as a benchmarking tool but he then kept his own version for record breaking.

Fun times. I've had a few conversations with him...back in the day you could just email him when he was in college but he has more of a life now.

OP, Google the BBP formula and you can understand how it is calculated. It's also how Pi results are validated.
View Quote
Like Prime95?
Link Posted: 9/20/2021 6:57:57 PM EDT
[#28]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
I'm obviously not a math major, but if you get a possible 1% error on 62,800,000,000,000 iterations, couldn't your final digit calculation be off quite a bit?

View Quote


It is not a "1% error."

It is a convergence rate issue that defines how many terms need to be maintained in RAM to corectly determine th enext digit.

One of the more common sequences has been mentioned.
Or as was noted, you can write it out to a RAID array every few gig.
Link Posted: 9/20/2021 7:03:02 PM EDT
[#29]
Discussion ForumsJump to Quoted PostQuote History
Quoted:


Are you suggesting that picking said sequence programmatically is the difficult part?

If not, then not sure how your statement could hold true. If swapping into and out of RAM is not a speed penalty than my 4 year old PC could break the record in the matter of weeks.
View Quote View All Quotes
View All Quotes
Discussion ForumsJump to Quoted PostQuote History
Quoted:
Quoted:


If you pick the 'correct' series the next point only depends on a very few of the points already computed.
No advantage to keeping it in RAM.

Selection of infinite series that converges on pi.

Pick a sequence that does not require a lot of terms to find the next digit.


Are you suggesting that picking said sequence programmatically is the difficult part?

If not, then not sure how your statement could hold true. If swapping into and out of RAM is not a speed penalty than my 4 year old PC could break the record in the matter of weeks.


If you have enough hard drive space it is all a matter of time.

18 Terra byte HDs are not hard to find.
Put together a RAID with some of them for redundancy.

or just buy a smaller one:

RAID array


The Bailey–Borwein–Plouffe formula (BBP formula) is a formula for p. It was discovered in 1995 by Simon Plouffe and is named after the authors of the article in which it was published, David H. Bailey, Peter Borwein, and Plouffe.[1] Before that, it had been published by Plouffe on his own site.[2] The formula is

   p = ? k = 0 8 [ 1 16 k ( 4 8 k + 1 - 2 8 k + 4 - 1 8 k + 5 - 1 8 k + 6 ) ] {\displaystyle \pi =\sum _{k=0}^{\infty }\left[{\frac {1}{16^{k}}}\left({\frac {4}{8k+1}}-{\frac {2}{8k+4}}-{\frac {1}{8k+5}}-{\frac {1}{8k+6}}\right)\right]} {\displaystyle \pi =\sum _{k=0}^{\infty }\left[{\frac {1}{16^{k}}}\left({\frac {4}{8k+1}}-{\frac {2}{8k+4}}-{\frac {1}{8k+5}}-{\frac {1}{8k+6}}\right)\right]}

The BBP formula gives rise to a spigot algorithm for computing the nth base-16 (hexadecimal) digit of p (and therefore also the nth binary digit of p) without computing the preceding digits. This does not compute the nth decimal of p (i.e., in base 10)[3] BBP and BBP-inspired algorithms have been used in projects such as PiHex[4] for calculating many digits of p using distributed computing. The existence of this formula came as a surprise. It had been widely believed that computing the nth digit of p is just as hard as computing the first n digits.[1]

Since its discovery, formulas of the general form
BBP
Link Posted: 9/20/2021 7:21:12 PM EDT
[#30]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
The circumference and diameter of a perfect circle always have the same relationship to each other. You wouldn't need to measure any specific circle to any specific... uhh... specificity to calculate that.
View Quote

Inception - Specificity scene (+ others)
Link Posted: 9/20/2021 7:33:23 PM EDT
[#31]
Discussion ForumsJump to Quoted PostQuote History
Quoted:

[snip]

We used to make large arrays of Silicone Graphics Workstations.

[snip]

We also pushed LAN speeds to over 1,000 GB per second when typical LANs ran at 10 GB/sec.

Bleeding edge engineering is green.
The color of money.
View Quote


Network throughput is measured in bits per second. Not bytes. I assume you meant Mbits anyway. When SG was a thing in the 90s, 10Mbps was still around, but FastEthernet (100Mbps) was the most common. Gigabit wasn't introduced until 1999 and by then SG was largely irrelevant.
Link Posted: 9/21/2021 6:53:00 AM EDT
[#32]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
FPNI.
It is covered in the middle of the second year of college calculus.  If you don't have 1.5 years of college calculus well understood, you can't understand what e really is, and how pi, e and trigonometry is all interrelated.  After that 2nd year of calculus, a whole lot of the leadup all makes sense.
View Quote


I learned all that in high school.  I’m not bragging, I just took math classes every year and had a very good understanding of calculus even in high school.

Unlike many modern public school math programs our school systems math program wasn’t just a bunch of random math facts, it built up every step of the way.

No, you’re not going to learn everything there is to know about calculus but you’ll know quite a bit, and that will give you some preparation in college if you go on to study in a STEM field.

Link Posted: 9/21/2021 6:59:32 AM EDT
[#33]
Pretty cool video on how Newton did it

The Discovery That Transformed Pi
Link Posted: 9/24/2021 12:06:56 PM EDT
[#34]
Crappy touch screen.
1000Gb.
There are plenty of places where new hardware is being
developed that operates significantly faster than available
"commercial'  equipment.

Same with A/D converters.
Link Posted: 10/21/2021 4:39:43 AM EDT
[#35]
I too never understood math until I got to calculus...I know this sounds funny....I am 63, retired mecanical engineer and still to this day amazed at math and actually considering taking some college courses again just to brush up on math....
Link Posted: 10/21/2021 8:46:03 AM EDT
[#36]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
I too never understood math until I got to calculus...I know this sounds funny....I am 63, retired mecanical engineer and still to this day amazed at math and actually considering taking some college courses again just to brush up on math....
View Quote


You’re not the only one.  I am 61, BS in Math and worked in software nearly 40 years, and I read math books for enjoyment . I’ve taken a couple online math classes and will take more math courses again when I retire.
Link Posted: 11/11/2021 10:23:25 PM EDT
[#37]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
My understanding was that they don't calculate it directly but rather use convergence techniques.
View Quote

This.  It was the only problem in a 100 level c programming class I remember.  We calculated it to a lot of places, but not that far.
Link Posted: 11/13/2021 10:19:36 AM EDT
[#38]
Discussion ForumsJump to Quoted PostQuote History
Quoted:
I too never understood math until I got to calculus...I know this sounds funny....I am 63, retired mecanical engineer and still to this day amazed at math and actually considering taking some college courses again just to brush up on math....
View Quote

Same here except I'm 75. Retired ME.

Calculus was the best math course I ever took (15 semester hours of it). I had all A's in all 3 calculus courses, and an A+ (100 average) one semester.

I still remember sitting in calculus class thinking, "Wow! Why didn't somebody tell me about calculus before now?"

It answers soooo many questions---and many questions that are not directly math related, like the inevitable self-destruction of democracies.
Close Join Our Mail List to Stay Up To Date! Win a FREE Membership!

Sign up for the ARFCOM weekly newsletter and be entered to win a free ARFCOM membership. One new winner* is announced every week!

You will receive an email every Friday morning featuring the latest chatter from the hottest topics, breaking news surrounding legislation, as well as exclusive deals only available to ARFCOM email subscribers.


By signing up you agree to our User Agreement. *Must have a registered ARFCOM account to win.
Top Top