# How to calculate pi

• posted

Hi,

includes the easy ways and the harder, precise ways.

For math freaks, engineers happy to just look it up.

..... Phil

• posted

Fun, thanks. As a common or garden workaday engineer I often need to calculate with 2pi and most of time for back of the envelope work using

6 is good enough to 5% and 6.3 is better than 1%. Anything more precise I turn on the computer :)

piglet

• posted

Limits of human knowledge in the 21st century, we know that the numbers e.g. e and pi are irrational and transcendental and have for about 200 years I think, but what do we know for sure about the numbers pi + e, pi

- e, (pi + e)^2, etc? Big lot of nothing, AFAIK it hasn't been proved if numbers like that involving those constant are even irrational, much less transcendental. It's suspected they are but it's difficult to prove.

• posted

There aren't that many analogue things that need pi to more than two places.

Cheers

Phil Hobbs

• posted

There is a recent youtube video that makes the case that a number like pi^pi (or something like that) could be an integer for all we know.

• posted

Not pi^pi I realize. Then it wouldn't be transcendental because the square root would equal pi.

It was some other function. Maybe it had two transcendentals so there couldn't be a function to derive either one from it.

• posted

I used to know pi to 100 places. I'm down to 20 now.

We're doing a timing project now and sometimes switch between cycles and radians, to about 1 PPB resolution.

• posted

Not square root. Meant to write pi-root.

Not sure if that would rule out being transcendental, if it could be expressed as a function of a transcendental.

• posted

Sure, plus frequency synthesis and all sorts of DSP things. (I only ever memorized pi to REAL*8 accuracy---for higher precision it's

4*ridiculous_precision_atan(1.).) ;)

Cheers

Phil Hobbs

• posted

I know more than 100 digits of pi, e and sqrt(2) combined.

I like to mix it up. pi alone is monotonous.

• posted

I know all the digits of pi.

But not necessarily in the right order.

• posted

I think numbers like pi^pi fall into the same case as pi + e, not even known if they're irrational, so yeah it could be an integer for all we know. That'd be weird. See e.g. the English translation of:

I think it's believed pi^pi is irrational but it's based on the unproven

which would also settle the issue of e + pi and e - pi.

• posted

Everything about the history of your life is written in the digits of pi! And all the alternate histories too. And every other irrational number. And a library that contains everything, contains nothing :(

• posted

We were allowed pi^2 = g in physics calculations at university. But not in crystallography classes where answers were required to 6 sig fig - forcing me to actually buy a calculator for the first time.

I recently had to do battle with REAL*16 to check something that was intended to be better than REAL*10 in normal use. Finding a friendly compiler that supported it was interesting. I tried the Intel one but it insisted on Win10 and then declared that my graphic card was inadequate! I also tried their online system but that proved rather unfriendly too.

Salford FORTRAN (now SilverFrost) was OK comes with a reasonable set of development tools and is free for hobby use £250 to license for research or commercial use. Alas it has no support for quad precision reals.

GFORTRAN as a part of the GCC compiler suite is surprisingly capable and handles quad precision without any difficulty. Best if the code is error free though - its error messages are terse and to the point. It doesn't insist on having a state of the art graphics card either.

It featured (or rather its square root did) in a new series Dr Who episode when someone was taken over by a malevolent entity and copies everything the Dr says in a very claustrophobic space tourism flight.

longer version with more tension in the build up

6*ridiculous_precision_asin(0.5) converges a lot faster.

These days it isn't such a problem since hardware support for floating point is much better. Some older implementations struggled with atan(1).

My supervisor used to use 4*atan(1) until someone pointed out to him that was the most difficult to converge point of the atan function. Some older FORTRAN compilers did not get it right to full precision!

• posted

The trouble with that is that it makes no physical sense. It's a coincidence, and not even a very accurate one. It's numerology.

Jeroen Belleman

• posted

He doesn't establish that PI is a constant. Sloppy thinking from start to finish.

• posted

It isn't - where space isn't flat. And Einstein established that it isn't flat anywhere where we feel comfortable.

• posted

Fred Bloggs wrote: ================

-------------------------------------------------------------------

** With the aid of a number of tasty looking pizzas - he demonstrates that the area of a circle with radius 1 is pi.

That will do me.

** Who's ?
• posted

Pi=6 is usually good enough.

• posted

Just remember PI Day is March 14th, good enuf.

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.