How Many Digits of Pi Does NASA Use? (kottke.org)
An anonymous reader quotes an article on Kottke.org: Mathematicians have calculated pi out to more than 13 trillion decimal places, a calculation that took 208 days. NASA's Marc Rayman explains that in order to send out probes and slingshot them accurately throughout the solar system, NASA needs to use only 15 decimal places. Rayman explains, "The most distant spacecraft from Earth is Voyager 1. It is about 12.5 billion miles away. Let's say we have a circle with a radius of exactly that size (or 25 billion miles in diameter) and we want to calculate the circumference, which is pi times the radius times 2. Using pi rounded to the 15th decimal, as I gave above, that comes out to a little more than 78 billion miles. We don't need to be concerned here with exactly what the value is (you can multiply it out if you like) but rather what the error in the value is by not using more digits of pi. In other words, by cutting pi off at the 15th decimal point, we would calculate a circumference for that circle that is very slightly off. It turns out that our calculated circumference of the 25 billion mile diameter circle would be wrong by 1.5 inches. Think about that. We have a circle more than 78 billion miles around, and our calculation of that distance would be off by perhaps less than the length of your little finger."
How many digits to use depends on the application. For a satellite trajectory the 15th decimal is OK, but if you want to make a sharp mirror the precision in the calculation have to be higher.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
when it comes to the universe.
I just use M_PI which is defined in math.h:
#define M_PI 3.14159265358979323846264338327950288
The symbolic constant is easier than typing in 15 digits, and the compiler recognizes the constant and optimizes it to use the hardware constant built in to the FPU, so I get faster execution as well.
http://www.cnn.com/TECH/space/9909/30/mars.metric.02/
Probably because given a standard pie's radius (around 6 inches) then using 3 provides a circumference which is accurate to roughly 1.5".
So they read NASA's paper, understood precision but got a little confused about Pi vs pie.
It's just how the be.
But certainly not mine, i have big strong man hands and 1.5 inches doesn't even come close...
It's true.
It little behooves the best of us to comment on the rest of us.
And similarly, 39 digits of pi will let you calculate a sphere the size of the observable universe with an error the width of a single hydrogen atom.
Liberty in your lifetime
Since they're unable to understand the difference between "there", "their", and "they're", their failure to finish sentences here and there isn't surprising.
https://en.wikipedia.org/wiki/Double-precision_floating-point_format
"This gives 15–17 significant decimal digits precision. If a decimal string with at most 15 significant digits is converted to IEEE 754 double precision representation and then converted back to a string with the same number of significant digits, then the final string should match the original. If an IEEE 754 double precision is converted to a decimal string with at least 17 significant digits and then converted back to double, then the final number must match the original.[1]"
The NASA computers will be using IEEE 754 floating point format, which in 64 bits (double precision) yields about 16 decimal digits of precision. So: what came first, NASA deciding that 1.5 inches the needed accuracy in the solar system or their computers being that accurate being deemed an acceptable accuracy ?
I am no fan of Republicans, and while there was an element of truthiness in the article you cited, in fact the article was satire.
Just use continued fractions and have the computer compute Pi or whatever else to whatever precision you need to achieve the desired result.
How many digits would it take of PI to bring the error down to the Planck length? Anything smaller in any measure of distance would be meaningless.
E Proelio Veritas.
Meh. What's sad is that it's 2016 and we see distances in miles and inches. Welcome to the 1950s.
If you plug that number into an iterative algorithm that uses any ill-conditioned functions, the 1.5-inch error can grow exponentially at every step. Ensuring that computations have acceptable error margins is an extremely complex and tricky subject.
See http://www.livescience.com/13405-pi-important-hoax-simplifying-110324.html
Whats truly sad is that the story is all too believable. (Here in Texas recently the official Republican platform called for abolishing the teaching of "critical thinking" in public schools.) (I'm an old "Eisenhower Republican" disgusted by the way the Corporacy Republicans have sold our economy depends on the megarich not paying taxes and on establishing a theocracy.)
1.5 inches. ... less than the length of your little finger."
There has to be a Donald Trump joke in there somewhere.
Maybe using SI units rather than neolithic ones would be more important than the number of digits of pi for NASA.
G, for example, is only known to 6.67408(31)e-11. I can't think of a single physical constant with a relative standard uncertainty smaller than 1e-10, so using 15 digits of Pi is at least three our four more digits than they need for real-universe calculations.
While "inches" might seem like pretty good precision, in actuality, NASA/JPL and the Deep Space Network (DSN) work to more precision than that. The navigation process (= figuring out where the spacecraft is) makes use of the round trip time from earth to spacecraft and back, measured very, very precisely. A typical specification might be measurement to 1 part in 10^15 measured over 1000 seconds. So there's your "15 digits", but in reality, you need to carry more digits in your calculations.
JPL measures the distance and range rate, and from that, calculates where the spacecraft must be, using the laws of physics.
To put this in more context, the distance to Saturn is a bit more than a billion km (10^12 meters), so the range measurement is being made to an accuracy of about 1mm. Think about that for a minute and what it means: you have to know where the antenna on earth is to an accuracy of better than 1mm, including compensating for thermal expansion and contraction, the wind pushing on the antenna, the amount of air in the path (and the composition of that air). The length of all the fiber optics and coaxial cables and accuracy of the timing equipment has to be stable or known to fractions of a mm (or, in time terms, picoseconds: 1 meter = 3 nanoseconds).
Velocity is a bit tougher (it's a derivative, so noise is bigger), and cm/sec is the typical measurement precision.
They hate us and want us to die? How can your kind defend that? Using three to represent pi will result in the deaths of millions.
But, it is more important that they remember to keep their units straight:
BTW: The accuracy of 227 is 2×10^4 and 355113 is 8×10^8.
The Rydberg constant is known to 14 decimal places, but I don't think it's very relevant for NASA calculations. https://en.wikipedia.org/wiki/...
That doesn't work so well if you use inches instead of meters.
although it's been a while, we always carried calculations out to a minimum of nine (9) decimal places and that included pi.
Intel CPU Truncate math digits plus some calculations are totally wrong. Using Intel's CPU, you would be more than a few inches wrong. Look at Japan's space probe that totally missed the planet thanks to wrong answers(numbers) from Intel's CPU. Japan is known for quality products and to be very precise so let's just blame it on the CPU since we have seen many different generation of Intel's CPU providing wrong answers. 15 digits for pi is actually to short for a $Billion Dollar Department that has Long Term Critical Missions. To get that Bacteria & Diamond, you got to get it on the Bull's Eye not inches away from it. If it's missing the Bull's Eye then the mission gets a C. Lots of room for improvement.
"15 digits oughta be enough for anyone"
The truncation error in cutting PI to 64 bits comes out to 1.5 inches out of 78 billion miles. But that is not how one decides whether 64 bits are good enough or not.
Each numerical operation will degrade the least significant bit. As you use result of one calc for the next you lose one more bit. If the final result you are looking for is the result of 10 operations, you could lose as much as one decimal digit in accuracy. If I have a 1 million unknowns and even if I somehow invert the million by million matrix and compute the solution in one pass, the last unknown will be only 3 significant decimal digits accurate. Usually we would use iterative methods to improve the accuracy to some seven or eight decimal digits.
Another important source of these errors is cancellation of terms. In math, a * B / B = a, no matter how big B is relative to A. In numerical computation if you add a large number and then subtract the large number, you would lose so many digits of accuracy. Similar thing happens when you multiply and then divide by a large number.
My work has not something monumental like calculating the orbits of spacecraft. Among the rocket scientists the lower echelons are made up of people like me, who toil, making a living by calculating intersections of triangles with tetrahedrons, the mesh makers, the grid generators. My code will drop down to using 128 bit or even 256 bit accurate calculations when necessary. It is insane when you think about it. One inch out of 78 billion miles? I am at one electron mass out of the mass of this galaxy! And... if the solution does not converge the first they blame is the mesh maker!
sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
Only because they redefined true as false in a previous bill.
systemd is Roko's Basilisk.
How much difference does general relativity make when measuring the solar system?
If the Sun and all the planets were removed, would the distance between where the Sun was and where Voyager is change?
systemd is Roko's Basilisk.
If only there was a way to make a "Thug Life" youtube video out of a ./ post.
I can't see nasa letting anything except significant figures limit the degree of accuracy used in their calculations.
Double precision numbers use a 53 bit mantissa. For the number pi â 3.14 the last bit of the mantissa has a value of 2^-51. Any real number between 2 and 4 can be represented with an error less than 2^-52.
At a radius of 12.5 billion miles, the error in calculating the product times pi before rounding would less than 12.5 billion miles times 2^-52 times 2, which is 0.352 inches or 8.94 mm.
The result in miles is about 78 billion, somehow bigger than 2^36. The rounding error would be up to 2^-17 miles or 0.483 inches or 12.3 mm. So the bounds for the rounding error alone is already higher than the bounds due to the error in pi.
Big deal son, y'know I come out with plenty of profound shit daily - even bi-daily on a good feedin' day - upon which I'll proceed to pipe my most profoundest shit down the Firehose pronto, only to watch the fans fling it back at me.
Some have suggested that the universe is a simulation, and a simulation is likely to use an approximation of pi, but that would cause a systematic deviation from actual pi in the observable universe. Therefore, if we sent probes on a 25 billion mile diameter journey at a target using the same approximation of pi that is used in the simulation, the probes would land closer to the target than probes sent with additional digits of pi.
This could be a way to test if the universe is a simulation.
"...our calculation of that distance would be off by perhaps less than the length of your little finger."
Or, by another measure, twice as long as Donald Trump's middle finger.
Just cruising through this digital world at 33 1/3 rpm...
Turns out it was 2.718 281 828 459 045 235 360... hence the result!
It does serve to illustrate though, the difference, in scientific terms, between accuracy, and precision.
Posting because I've seen too many programmers misunderstand this and screw things up when using floats. This does not mean you can do whatever you want with floats and your accuracy will be at least 1.5 inches within a 25 billion mile radius. It means an individual double float number has a precision of 17 significant figures, nothing more. When you start doing math with that number, the precision can quickly go out the window.
For example, if you add a large float to a small float, say 3.14159265359x10^8 + 2.7182818284x10^-3, the latter number doesn't actually matter because it's largest digit is smaller than the uncertainty (the last significant figure) in the first number. In other words, floating point's accuracy decreases the further you get from zero. A solar system modeled with ints will have the same resolution everywhere, which is how people want to think significant figures work. But a solar system modeled with double floats will have very fine resolution close to the origin, lousy resolution out near the edges.
To do this sort of math accurately using float (e.g. calculating docking coordinates for two spacecraft orbiting Jupiter), you are better off first doing a coordinate transform to center your zero closer to where everything is happening, do your math, then transform the results back to your original coordinates (or keep them in your new coordinate system if you plan to do more math there later). Obviously that's a pointless exercise with this simplified math problem, but it can make a big difference in accuracy with more complex math.
For a real-world example, we once networked two flight simulators together and tried to make them fly in formation. The position of the second plane appeared to jump all over the place when viewed from the first plane, and vice versa. What was happening was our coordinate system was fixed to the Earth. Planes fly on the order of 1000 kph. At that speed, a transient network lag error of only 10 milliseconds results in a position error of several meters (dp = v * dt). It didn't matter that we knew the velocities to 7 significant figures or even if we'd known them to 17 significant figures, because the error in the timestamp overwhelmed that accuracy. The fix was to define a new coordinate system centered on the first plane. The velocity of the second plane was then only a few cm/sec relative to the first plane (since they're flying in formation), and the jumping disappeared since a 10 ms error only resulted in only a few millimeters of error.
'How I want a drink, alcoholic of course, after the heavy chapters involving quantum mechanics'
This would be it. This is a good example of an article that should be on slashdot.
A value of 3 was good enough for the Bible, though back then the Earth had 4 corners.
When tracking something in space and time, the coordinate system should never matter (it just makes the mathematical model easier or harder). You should have instead time tagged the state information. Then when the other platform received the state information, it extrapolates the state information to current time before using [displaying] it. The only requirement here is that your two platforms agree on the time to a high [enough] precision. While this is not a simple problem, it is well understood. Search for Kalman filtering and Sensor fusion for more information (advanced knowledge of signal processing is typically a perquisite).
In sensor fusion you typical track in ECEF or LLA even though you will most commonly detect/search in LTP.
If you like pi pie, check out https://github.com/rubypanther...
Then in your Ruby code you can say PiPie.[unicode pi symbol not shown]
More pie in your pi! And more PI, too. (1m digits)
It also has PiPie.Feynman if you only need up to the Feynman Point.
I'm usually quick to point out some incorrect garbage in the summary but this seems to come from JPL themselves so I'm cautiously asking if I did this right?
15 decimal places of pi is 3.141592653589793.
25billion miles is 40,000,000,000m or 40e9m
40e9 * 3.141592653589793 - 40e9 * 3.141592653589792 = 40 e-6 or 40 micrometers.
40 micrometers = 1.57 thousands of an inch, not 1.57 inches.
Did I do something wrong or are NASA about to crash another rover?
When You're talking about going to my house to yours, which can take only 100 meters, some calculations really don't matter. But when we're taking about space, we are talking about very big distances. If You wanna put a rocket in orbit, YOU MUST USE PRECISION. There's a special place in computer sciences to deal with complex mathematical models, that can solve pretty well most of calculations used to travil in space very well, without the need of worring about silly digits.
eng1: How many digits of pi did you use?
eng2: 16.
eng1: So how come the spacecraft isn't on track? It's off by several tens of meters already, and we just launched.
eng2: Meters?
I've fallen off your lawn, and I can't get up.
Tell that to anything moving at a significant fraction of lightspeed.
There is no such thing as simultaneity...
AC
One time I was asked to debug signal processing problem. During the processing, the author of the code needed to quickly calculate exp( 2*Pi*i*alpha*t) for t = 1, 2, ... 60000 and i=sqrt(-1). He made the matrix M =
[ cos(2*pi*alpha) -sin(2*pi*alpha);
sin(2*pi*alpha) cos(2*pi*alpha) ]
and then ran the loop
v = [1 ; 0]
for j = 1 to 60000
v = M*v
save(:, j) = v
end
His answers were kind of wrong because his value of Pi had only 8 digits of precision. The value exact value of alpha was known. When j>50000, his answers had only 3 significant digits which led to a bug.
Logged in just to point this out. Ninja'd. On Pi day it's always fun to remind people of this - but they always act like you're a troll. No, just correct. Pi is only Pi in a flat space with no energy/mass in it. In other words, it's never equal to the formulas that calculate it out to N digits anywhere in the known universe, and at some point, just you being there to measure it would make it not right (not sure how many decimal places out, but in theory, even a human body warps space a little).
Why guess when you can know? Measure!
I wondered what kinds of sequences one might find using the 15 digits of pi mentioned.
So I took "141592653589793" and checked for easy factors. I got it down to 7 x 17 x 23 x 51732792689
Wolfram Alpha said 73 was a prime factor (to) 708668393 ---> which is itself, a primitive pythagorean triple
---> 708668393**2 == 81521865**2 + 703963832**2
Prime factorization of 81521865 == 3^2 x 5 x 241 x 7517
Prime factorization of 703963832 == 2^3×11×13×19×139×233
so, 15 digits of pi equals
3 + (7 * 23 * 73 * ((3^2 x 5 x 241 x 7517)^2 + (2^3×11×13×19×139×233)^2)^0.5))e-15
That sort of measurement is regularly done, and used to determine the internal structure of planets you're orbiting around. Relativistic effects are calculatable.
No, pi is independent of any circular thing in the real world, and also occurs in other realms than geometry. Pi is not the product of measurement in flat nor any other kind of space. It has (several) purely mathematical definitions
Distortion of space has nothing to do with the value of pi, nor does it change it.
You can use PI to 15 decimal places, but I doubt r is known anywhere near accurately enough for it to be worth it. I might be wrong...
You missed the joke. Or your post is the pointe of the joke.
In the beginning... Pi was Integer and was One... ... In the Age Of Titans (?)... Pi was Integer and was Three...
In the Beginning... Pi was Integer and was One. In the Age of Gods (?)... Pi was Integer and was Three...
The exact value of pi is only relevant in a flat (Newtonian) space-time, not in general relativity.
when will they finally go metric?
Also slashdot, a quite international website.
Atari rules... ermm... ruled.
But the GP's question was how much does the physical manifestation differ from pi? And in that case, spatial distortion has a very real effect.
Pi is the ideal. But nothing in spacetime is ideal - chaos theory and resulting fractals down to the Planck length see to that.
If NASA actually does calculations the way suggested in the summary than they aren't 'off the width of your little finger' because its NOT the 'accuracy of PI' that matters here...its the accuracy of that 12.5 'billion miles'...if that's the precision we know the distance to Voyager than said circumference is off by 'up to +- 100 MILLION miles'...for every digit of accuracy added to this then that accuracy gets better but its not the use of PI to 15 decimal places that defines the accuracy.
Is this filed under 'science for idiots' or something?
I'm aware of that - I've written books on Digital Signal Processing, for example. So, why in fact does everybody conflate pi with the ratio of the circumference to the diameter of a circle, without mentioning it's imaginary since there is no flat space in the known universe where that definition is actually true?
You just moved the problem without solving it. Read article, title and so on.
Why guess when you can know? Measure!
Only true to a point, While my personal Research never took me to relativistic speeds. The people who built the GPS network would beg to different if you are trying to say the problem isn't solvable.
You are confused. Pi is indeed the ratio of circumference and diameter of a circle as defined in geometry, but they do not occur anywhere in the real universe (as defined in geometry). People are confusing models of reality and geometric definitions with reality. Just as there are no ellipses in the real world (no real orbit is elliptical or circular), no ballistric trajectory is truly parabolic, etc. The shapes are useful for approximately modelling reality however.
less than the length of your little finger."
Unless your name is Donald Trump.