Of course, that is just for the simple operation of calculate the circumference given the diameter, more complex operations with pi may require more precision.
[1] http://www.wolframalpha.com/input/?i=observable+universe+dia...
Clearly if the diameter of the universe is smaller than a proton then you don't need 43 digits of pi to calculate its circumference to smaller than the diameter of a proton. So if the diameter of the universe is 10^1000000^100000000 proton wide the precision you need for pi would be way higher than 43?
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 navigation for few months, where relatively low accuracy is required.
With the same precision, you start to lose phase accuracy above 24 hours if you're simulating GPS constellations. You need quad precision or above for simulations > 24 hours.
For simulating planet trajectories and solar system stability (Lyapunov time of planets), IEEE64 is good for ~10 mya in the future (Neptune-Pluto Lyapunov time), IEEE128 for ~200-1000mya, above that it is recommended to use 256bit floats and above. This is assuming typically ~1000 steps per simulated orbit.
Fun fact: we know from simulations that Pluto trajectory is stable for >10G years, but unpredictable above >10M years because of chaotic (but stable) interaction with Neptune.
[1] https://en.wikipedia.org/wiki/Stability_of_the_Solar_System
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 field, nobody wanted to be responsible for turning off their defensive systems for a minute.)
Just because π is estimated to 15 significant digits doesn't mean the entire calculation needs to be.
G, for example, is only known to 5 or 6 digits of precision.
Nevermind the mass of the rocket/satellite/probe, positions, the mass of earth, orbital perturbations not accounted for ... etc.
What NASA does do is know precisely the error bounds of any important number which is far more valuable than using arbitrary precision math for π.
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 know about infinite.
3.1415926535897932384626433832795028841971 is precise.... it has a lot of digit and people loves that.
In ana num 3.15159 +- 0.00001 is exact. It bounds your result. Hence you can estimate your error and its propagation.
Because we thought humans were smart we thought that 3.14159 would be so meaningful people would understand that a constant should be considered to be exact with the implicit meaning that 9 was the last significant digit and people would be wise to use upper and lower bounds to estimates their results.
Then Computer Science was taught in university.
People not understanding why they had to study math and physics to simply program 2 + 2 and thought, stop bothering us. We just compute TVA we don't send a rocket to mars. Why learn boring math (integration, derivation, Newton's methods for approximation, Taylos's development, Cauchy Suites, condition of converging Suites, Integration in the complex field to compute generalized integrals, simplex, LU/RU matrices ....)
Yes people loves recurrence. They cannot apply the reasoning to simple maths series.
And that's how we have funny stuff like a lot of coder not understanding why :
1.198 * 10.10
12.099799999999998
Yes ... why are computers' maths so odd. What can we do about it?Having a look at HP Saturn opcode makes you wonder if the lack of solution is because it does not exists or because people forgot. http://www.hpcalc.org/details.php?id=1693
Freshmen engineers had to take a year-long Numerical Analysis and FORTRAN programming class at my undergrad university. We would learn various iteration methods for solving equations and the homeworks would be more problems to solve with a program or two to write too.
This stuff is still taught, it just might be out of a different department than physics.
see - Lec 01: Units, Dimensions, and Scaling Arguments | 8.01 Classical Mechanics (Walter Lewin) [1]
[1] https://www.youtube.com/watch?v=X9c0MRooBzQ#t=4m30s
Physics Works !
https://books.google.com/ngrams/graph?content=3.1416&year_st...
If you measured your height with fifteen degrees of precision, you would have a measurement in femtometres. A femtometre is roughly the diameter of a proton.
That's really precise!
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.
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).
Physics is full of dirty shortcuts. I dread every time I see somebody using a natural units system.
The first actual hand-held calculator I every saw was a Bowman Brain (simple 4 function calculator) it was for sale in 1971 at the MIT COOP (the bookstore). I only knew one person that bought one; the rest of us continued carrying around our slide rules (they came in handy leather holsters with belt loops.) The HP that came out about a year later was a real scientific calculator.
Years before that, sometime between 1965 and 1968, on an episode of Lost in Space (a TV program with a family of early space explorers lost in outer space) the son, Will Robinson, was carrying around a large device about 3 inches thick and a foot tall that looked like a calculator. I thought the idea quite marvelous and went to bed thinking about it and how much better it would be than my slide rule for playing around with calculations. (I was a weird kid.)
There is a great story about an incident where a waste recycling problem caused a mission to be aborted. There was urine all over the inside of the capsule. NASA publicly reported that it was a computer failure.
Unfortunately HP had just done an ad campaign about their computers in space. HP sued and NASA settled for an unknown amount.
[1] http://history.nasa.gov/computers/Ch1-2.html
15 digits is about what's offered in double precision floating point calculations.
This is a bit of an oversimplification as well, it's not like you keep multiplying pi with itself over and over again and it's not like the error you introduce is random, if you've rounded pi once, you're gonna keep make a slight error in the same direction.
If you were right there'd be no hope of ever getting sane results when multiplying largish matrices of doubles regardless of the presence of pi.
I'm not saying that accumulation of error doesn't exist, I'm just saying that it's not to the extremes you're describing.
A matrix of measurements, by its turn, normally has unbiased errors, what makes the resulting error grow much slower.
Xerox Basic FORTRAN and Basic FORTRAN IV Manual[0], attributed to David H. Owens.
[0] https://www.textfiles.com/bitsavers/pdf/sds/sigma/lang/90096...
libm frequently contains 2/pi to very high precision. For example, Newlib's math library contains 476 decimal digits of 2/pi as part of its routines for calculating sine and cosine of numbers outside the range [-pi/4..pi/4].
See e_rem_pio2.c for more. Many of the open source math libraries are ultimately descended from the same root: the Sunpro fdlibm, archived at netlib: http://www.netlib.org/fdlibm/
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.
Because for everything involving real-world data, you'll have to measure quantities, and this is hardly ever done to more than just a few decimal digits. Whenever I want to state the circumfence of anything I know the diameter of down to single numbers of proton diameters, I first have to measure the diameter of to a precision of 1/3 proton diameter. Only when I reach such an absurdly nonsensical precision, I'd introduce errors by using an inadequately runded value for Pi.
More practically: I might know that I could line up 2.611*10^25 protons (disregarding the fact that due to their charge they would repel each other) around the earth, but to calculate that I only need 5 decimal digits of the earth's diameter, and only 5 decimal places of Pi.
And: https://en.wikipedia.org/wiki/Approximations_of_%CF%80
Babylons and early Chinese just used pi = 3.
Romans used pi = 3.125.
respecting accuracy encourages a self awareness with an almost conscious stead ignorant error
i am always intrigued when it is discussed how a calculation began and the error of the initial values
the first known attempt at measuring the speed of light(o) had an ignorant error of ~26%
the first known attempt at measuring the circumference of the earth(i) had an ignorant error of ~15%
> our planet Earth.. the circumference ..
> .. would .. be if you used the limited version of pi above?
> It would be off by the size of a molecule.
our conscious error is the size of a molecule, but what will our ignorant error be? how will its significance manifest?the ignorant error is a result of the tools of measure, in this case observable measurements and numerical approximation
for those who calculated using pi equal to 22/7, for the circumference, their error would only be ~.04% of the 15 digit rounded value
>>>2*(22/7)*(7926/2)>>> 2*(22/7)*(7926/2)
24910.285714285714
>>> 2*(3.141592653589793)*(7926/2) #from the article
24900.2633723527
>>> 24910.285714285714/24900.2633723527
1.0004024994347707
>>> (1.0004024994347707-1)*100
0.04024994347706645
(o) https://en.wikipedia.org/wiki/Speed_of_light#First_measureme...(i) https://en.wikipedia.org/wiki/Eratosthenes#Measurement_of_th...
.. edit, percentage error, left out the *100
Euclidean geometry is not the only one and some physical problems are solved using spaces in which pi is NOT 3.1459
;)
As many as it takes.
Also, what about the quest for finding the largest prime? #keepthedreamalive