Live data from Hacker News

How Many Decimals of Pi Do We Really Need?

jpl.nasa.gov

121–130 of 134 posts

Re: How Many Decimals of Pi Do We Really Need?

#121
post #69
post #5

In the 'Frontiers in Astrophysics' course on Open Yale, professor Bailyn says that, for the purpose of the course, pi = 3, and pi^2 = 10. Pi = 3, coincidentally, is the Hebrew Bible's approximation too.

> Pi = 3, coincidentally, is the Hebrew Bible's approximation too. Certainly it's not explicitly spelled out. The example I've heard was the outer diameter and inner circumference of a vessel's circular rim were given. Pi comes out to 3 only if the thickness of the rim of the vessel is zero.

Yes I was over-egging the cake.

It is a large cast bowl in 1 Kings 7:23ff. It's beloved of a certain kind of 'gotcha' internet skeptic "Proof that the bible thinks Pi is 3 !!1! How dumb are teh Christians!".

But the passage itself even mentions the thickness of the bowl, and there's no reason to assume the numbers are anything more than a description of a particular bowl (which inevitably wouldn't have been perfectly circular).

Re: How Many Decimals of Pi Do We Really Need?

#122
post #10
post #2

15 digits is about the precision hand-held calculators provide, right? Many early NASA missions took HP calculators along in missions with trajectory routines in case the computer failed.

Handheld calculators typically get between 8 and 12 digits of precision. A four-function calculator will top out at 8; a scientific calculator will offer more (plus scientific notation support). 15 digits is about what's offered in double precision floating point calculations.

If you're interested in common handheld calculators, you might enjoy this light-hearted series by Matt Parker titled "Calculator Unboxing": https://www.youtube.com/watch?v=8Nzi1h2m7pE&list=PLt5AfwLFPx...

Re: How Many Decimals of Pi Do We Really Need?

#124
post #22

This overlooks the issue that for repeated calculations, such as numerical integration, the trouble comes from accumulated roundoff errors. Even 16 digits of precision can become 0 digits pretty quickly if you're not very careful.

A branch of physics used to be taught a long time ago called "numerical analysis" to deal with this issue. We even used to be careful about the difference between 'precise and exact'. Pi = acos(0) is absolutely exact. But computer don't know about symbolic calculus. So to put the value in a register we used tricks. Pi as a the converging value at the infinite of the Taylor development is awesome. But computer don't k…

Numerical analysis is the cornerstone of the applied mathematics curriculum, and still very much taught. Any applied mathematician, physicist, or engineer will have at least some background in the subject, and anyone with a good graduate degree will usually have taken two or three courses (source: I TA'd one of the graduate numerical analysis courses at Berkeley for a couple years, it was a requirement for many engineering grad students).

Re: How Many Decimals of Pi Do We Really Need?

#125
post #99
post #76

Earlier quoted context omitted.

Does that mean the rest of the digits of pi are not "real," at least according to a realist rather than a Platonic philosophical position on the meaning and nature of mathematics? Seems like you could argue that digits beyond what are needed to render measurement to within one Planck length are meaningless and therefore a kind of fiction... at least if you take that philosophical position.

It's been estimated that if the universe were a computer, it could have performed no more than 10^120 operations on 10^90 bits of data so far (based on the size, age, and total energy of the known universe). http://arxiv.org/abs/quant-ph/0110141 I think the number of physically relevant bits of pi would be represented in there somewhere. But there's a long road ahead. If the universe keeps "computing" forever, the pr…

And wave functions collapse only upon measurement...clever lazy initialization

Re: How Many Decimals of Pi Do We Really Need?

#126
post #14

Earlier quoted context omitted.

I agree, that's a poor answer by NASA director and chief engineer. Here is a better answer: The precision used for calculations is dependent on the number of "steps" required to get to the final result. Roughly, for N repeated calculations you lose somewhere between sqrt(N) * eps to N * eps of precision (eps=2e-16 for IEEE64). Here are some actual examples: IEEE64 (~16 decimal digits) is OK for interplanetary navigat…

So don't use a lossy floating point representation and use arbitrary precision instead. Just because π is estimated to 15 significant digits doesn't mean the entire calculation needs to be.

Pi cannot be stored exactly even with arbitrary precision.

Re: How Many Decimals of Pi Do We Really Need?

#127
post #107

Earlier quoted context omitted.

Here are some actual examples: Something to add to your list of examples: During the first Gulf war, 28 US soldiers died due to accumulated rounding errors in the Patriot Missile battery computers: https://www.ima.umn.edu/~arnold/disasters/patriot.html (This was in fact a known issue, and operators had been instructed to reboot the computers every 8 hours. Unfortunately this instruction ignored the fact that, in the…

Yeah, that doesn't surprise me in the least, many high-tech military systems have MTBF/MTTF of a few hours at best. Also, that's what you get when you try to do radar time computations using 24-bit fixed point in Ada. Back to astronomy, in many astronomy libraries (such as astropy library) computations regarding time are done using 2 doubles (about 106 bit precision). 1 double is not enough. _brandmeyer_ also mention…

any trigonometric computation requires computing modulo-pi to an accuracy of 1 ulp

For the trigonometric function itself, sure. For any reasonable algorithm which uses the trigonometric function, no. If find yourself computing sin(10^6), you're not really trying to compute sin(10^6); you're trying to compute sin(x) for some value of x which you know lies between 10^6(1 - epsilon) and 10^6(1 + epsilon). So the extent to which trigonometric calculations can lose precision by not doing extra-precision argument reduction, that precision was already lost in computing the unreduced argument.

Re: How Many Decimals of Pi Do We Really Need?

#129
The best way of looking at problems like this, is that it's an exponential process. The number of values you can represent with n digits increases exponentially. Each additional digit increases your precision by a factor of 10. If you have 15 digits, well imagine multiplying 10 over and over again 15 times, it's pretty big.

The word "quadrillion" is rarely used in the English language. Because it's very rare you need numbers that large. And when you do, being off by a few digits doesn't matter. Calculators commonly only display up to 8-10 digits, for example.

This applies to programming, since computers often only have a limited number of bits. Programmers often complain about floating point. One of the things about neural networks is that they don't actually need that many bits of precision, since they are by nature very "fuzzy". We can build computers that are bigger/cheaper by sacrificing a lot of bits.

But one of the problems is, when adding a bunch of small numbers together, it rounds to the nearest whole number every time. And the inaccuracy builds up. So to really take advantage of less precision, we need to somehow build computers that can do stochastic rounding, where they sometimes round up, and sometimes round down, so the expected output is the same.

Re: How Many Decimals of Pi Do We Really Need?

#130
post #37

Earlier quoted context omitted.

I can't speak for other nations, but they still teach numeric analysis in Chinese universities as an undergraduate course. In my university it is a required subject. Many of us have countless dreadful memories of Runge-Kutta method, Euler's method, Newton's method, rate of convergence, numerical stability and error margins, just to name a few of the dreads...

Taught to me at university. Far more important in the age of computers than before.

> at university

In which country though?

Post reply on HN