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."
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
Duh... What?!? Reference, please??? What hardware constant built into the FPU?
Pi is built in to x86s. You can load it into a register with the FLDPI instruction. It is built in to many other processors as well. Using it will give you the maximum precision, and will be faster to execute since it uses less bandwidth and cache.
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.
Err, no. The radius of a proton is around 10^-15 meters. Atoms are 10.000 times larger than that. Visible light is around 5 * 10^-7 m, depending on color. Polishing a mirror at 10^-15 accuracy would be physically impossible and pointless.
78 billion miles is nothing when it comes to the universe.
You're saying that it's still in the same ballpark as a trip down the road to the chemist, then?
"Slashdot - News and Chat Sites Deviant". (Click "homepage" link above for details).
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.