> For JPL's highest accuracy calculations, which are for interplanetary navigation, we use 3.141592653589793
> by cutting pi off at the 15th decimal point… our calculated circumference of the 25 billion mile diameter circle would be wrong by 1.5 inches.
The author also has a fun explanation that you don’t need many more digits to reduce the error to the width of a hydrogen atom… at the scale of the visible universe!
It's a good metric to determine how advanced a civilization it. Would be cool to just compare pis with the aliens, and then whoever has the longest pi takes over, rather than fighting to extinction.
Calculating the circumference of a circle isn't the only thing pi is used for. And small errors at the start of a calculation can become big errors at the end. So I don't find this argument very convincing.
That's why they are using 15 decimal places, which in reality, is complete overkill. No instrument I am aware of is capable of measure with such accuracy, top of the line is usually at around 9 decimal places. This is a scale at which relativistic and quantum effects have to be considered.
That pi is 6 orders of magnitude more precise. The nice thing about having 6 and not just 1 or 2 (that would be sufficient) is that you don't have to worry too much about the exponential effect of compound error.
So really 15 decimal places is enough not to worry about pi not adding significant imprecision to your calculation, but not so ridiculous as to waste most of your time processing what is essentially random digits.
That it roughly corresponds to the precision of IEEE754 double precision floating-point numbers is probably no coincidence. This is maths that standard hardware can do really well. More than that requires software emulation (slow) or specialized hardware (expensive).
I love the fact that some random dude on HN is telling NASA that their calculations regarding space calculations are not very convincing. Internet can be a beautiful place.
The impact of a higher precision in pi depends on the rest of the calculations or simulations; factors like the (roundoff) errors caused by the size of your floats and your other constants, the precision of your calculations (like your sine), or (roundoff) errors in your differential equations and timestep accumulations. And finally, you have uncertainties in the measurements of the world (starting conditions) you use for your simulations. I guess in NASA's case, a higher precision in pi doesn't add to the overall performance of their calculations, or at least not to a relevant one.
But all measurements of weight, length, position/speed have errors multiple orders larger. Errors by second and third approximations will dominate. Let alone unpredictable (unknown) physics playing a role.
This calculation demonstrates how our current 64-bit FP operations are wide enough for almost all physical world needs. But to make the point even clearer:
in one 2^-64th of a second, an object moving at the speed of light would not cross the diameter of a hydrogen atom.
c in 2^64 = 1.625 × 10-11 m/s; width of a hydrogen atom: 2.50 ^10-11 m
if memory serves, the problem with ieee754 fp representation isn't the relative sizes of its largest and smallest possible values, but its uneven representation of the values between
If pi is truly infinite wouldn’t it eventually express a sequence of information which would be self aware if expressed in binary in a programmatic system?
My understanding (which might be wrong) is that just because PI is infinite and non-repeating, doesn't necessarily mean that every conceivable pattern of digits is present.
As a contrived example, consider the pattern:
01 001 0001 00001 etc.
This pattern is infinite and never repeats but we will never see two consecutive "1"s next to each other.
We know for a fact that pi is truly infinite, there's no "if" there. But we are not sure whether it contains every sequence of (e.g.) decimal digits.
Either way, your proposition works for "the list (or concatenation) of all positive integers in ascending order" as well. There is no deep insight in it, even if it were also true for pi.
if you accept the premise behind this question (which I wouldn't dispute) then theoretically any information at all would be self aware given the right computer
What you want is a disjunctive number, also called rich number or universe number.
It is an infinite number where every possible sequence of digits is present, and therefore, such a number contains the code of a self aware program, as well as the complete description of our own universe (hence the name "universe number") and even the simulation that runs it, if such things exist.
We don't know if pi is a disjunctive number, for what we know, though unlikely, the decimal representation of pi may only have a finite number of zeroes. It means we don't have the answer to your question.
I wonder why they don't just use the highest precision possible given whatever representation of numbers they're using? I know these extra digits would be unlikely to ever matter in practice, but why even bother truncating more than necessary by the hardware? (Or do they not use hardware to do arithmetic calculations?)
> The author also has a fun explanation that you don’t need many more digits to reduce the error to the width of a hydrogen atom… at the scale of the visible universe
How many more, though?
<Perfectionist>1.5in of error per few billion miles seems a bit sloppy, even though I'm sure it fits JPLs objectives just fine.</>
It’s an education article, and the author mentions he first got the question from (presumably American) students so it makes sense he would answer in imperial units that an American middle schooler could understand.
- hey space nerds, check out my new result
- oh yeah what ya got math kid
- new digits of Pi. Such fast, very precision!
- not this shit again
- it's so cool, *look at it*
- tl;dr
- but it's the key to the universe
- ok ok, look we have to do actual space stuff
- laugh now fools, while I grasp ultimate power
The Bible uses PI = 3 and that's good enough for me
> And he made a molten sea, ten cubits from the one brim to the other: it was round all about, and his height was five cubits: and a line of thirty cubits did compass it round about.
In the original Hebrew version of I Kings, in that verse the word for 'circumference' is traditionally written differently to how it is read (there are instances of this kind of thing all over the Bible [1])
Each letter in Hebrew has a numeric value [2].
As written: קוה = 111
As read: קו = 106
Ratio between them: 111/106 = 1.04717...
Which is exactly the ratio between the reported value of pi (3) and the real value to 4 decimal places (3.1415)
So maybe they did have a better idea than "3". The 3 in the verse is to keep it simple, but there's a clue there for those who want the real number.
How many significant figures was it to? How accurate was construction and measuring techniques? 9.7 diameter would be reasonable as “10”, as would 30.47 being “30”, with values being well within 5%.
Funny how that's how described in the Pentateuch's tabernacle: God sends detailed instructions about how many buttons (?) the priest's clothing should have but when it comes to PI "yeah, 3 is good enough"
If space can be curved, non-flat, then can't pi take on a wide variety of values, like near the high curvature of space near a black hole? As I suspected...
> "Now, some fun facts: for a circle of radius 1000 miles, the value of "π" would be around 3.10867! For a 50 mile radius, "π" would be 3.14151. And even the engineers who built the Large Hadron Collider should have worried about the value of "π", since for a circular structure 2.7 miles in radius (which is the case for the LHC) "π" would be 3.141592415! So, we strongly encourage all high energy physicists and their sympathizers to celebrate Pi Day two minutes earlier than the rest of the world to honor our non-Euclidean geometry! As for the community of general relativity... we encourage them to redo all the calculations in a non-minkowskian metric for a non-massless Earth to know exactly when they should celebrate Pi Day. Also, advocates of the Indiana Pi Bill who root for legally making π equal to 3.2 should probably reconsider and change it to a value smaller than 3.1415926, since no circle on Earth would give them their desired result! Though if the surface of our planet was a saddle, that would be a completely different matter..."
π is defined as the ratio between a circle’s circumference and diameter in ideal flat Euclidean space. You can measure circles in other spaces and get different numbers, but those numbers are not π. (That’s why your linked article writes π′ or “π” when referring to those numbers.)
Yes, this is kind of a pointless post since it doesn't answer the question in the title. Instead, they just show that the "default" number of digits is enough.
JPL needs the number of digits in a double float because JPL needs to use double floats because JPL is performing engineering.
Paradoxically, double floats are engineered to provide more digits than you need because you need more digits than you need when engineering because if you don’t have insignificant digits to drop, you don’t have enough digits.
Well kinda, the size of the mantissa is certainly chosen to be large enough to give the precision scientific computing would "typically" need, but that's considering trade-offs and just being vaguely good enough for most cases. Sometimes we use 80-bit extended precision floating point for example.
Yes, the error in floating point calculations compounds. However, you can figure out how fast it compounds, and there are different algorithms where it compounds at different rates.
Generally speaking, if you think you need more than double precision, what you really want is double precision and a better algorithm. Generally speaking.
Keep in mind that all of your actual measurements are going to be way less precise than double precision. Tools like LIGO can measure differences to better than double precision (1 part in 10^21, or something like that), but they're not actually making any measurements to that kind of precision, they're just measuring changes of that magnitude.
> Generally speaking, if you think you need more than double precision, what you really want is double precision and a better algorithm. Generally speaking.
Though a lot of the time, the better algorithm is using an error accumulator-- so 2 doubles. This tends to outperform 80-bit extended precision, double-double, or long double arithmetic... but more precision would often also suffice and use the same amount of space.
Repeated summation can compound rounding errors and reduce the effective precision of floating point encoded numbers.
Doubles have ~16 decimal digits of precision but adding a billion doubles together sequentially (simple summation) could with worst case data reduce your effective precision to only ~7 digits. Random data would tend to have a sqrt(n) effect which would leave you with ~11 digits.
Several algorithms have been devised to reduce or even eliminate this effect. Kahan summation for example typically results in the precision loss of a single addition, effectively eliminating the compound errors. https://en.wikipedia.org/wiki/Kahan_summation_algorithm
This is one of the frustrating elements in people who use this argument to say that computers can simulate abitary physical systems.
OK, so simulate the 10^30 atoms in my table, give me their spatio-temporal evolution in structure under gravity, etc. etc. How much preicision in pi do you need, when you are compounding interactions of 10^30 atoms each tick? Basically infinite.
It’s very interesting how effective double precision is for doing physical calculations. Higher precisions exist but almost all of the time the answer is not to use them, but to scale your equations differently.
> For JPL's highest accuracy calculations, which are for interplanetary navigation, we use 3.141592653589793
> by cutting pi off at the 15th decimal point… our calculated circumference of the 25 billion mile diameter circle would be wrong by 1.5 inches.
The author also has a fun explanation that you don’t need many more digits to reduce the error to the width of a hydrogen atom… at the scale of the visible universe!
Yeah, yeah, go ahead and downvote this one to death. I know we don't like jokes 'round these parts, especially low-effort immature ones. :~(
That pi is 6 orders of magnitude more precise. The nice thing about having 6 and not just 1 or 2 (that would be sufficient) is that you don't have to worry too much about the exponential effect of compound error.
So really 15 decimal places is enough not to worry about pi not adding significant imprecision to your calculation, but not so ridiculous as to waste most of your time processing what is essentially random digits.
That it roughly corresponds to the precision of IEEE754 double precision floating-point numbers is probably no coincidence. This is maths that standard hardware can do really well. More than that requires software emulation (slow) or specialized hardware (expensive).
You think the NASA JPL is mistaken about how accurate they need Pi to be?
c in 2^64 = 1.625 × 10-11 m/s; width of a hydrogen atom: 2.50 ^10-11 m
Anything shorter than about 10^-43 sec is faster than light can travel a Planck length.
If you meant that 64bit long is a rather large 20decimals, indeed it is.
As a contrived example, consider the pattern:
01 001 0001 00001 etc.
This pattern is infinite and never repeats but we will never see two consecutive "1"s next to each other.
Either way, your proposition works for "the list (or concatenation) of all positive integers in ascending order" as well. There is no deep insight in it, even if it were also true for pi.
I'd rather say it contains the code to generate itself which should be much easier (= earlier) to find.
It is an infinite number where every possible sequence of digits is present, and therefore, such a number contains the code of a self aware program, as well as the complete description of our own universe (hence the name "universe number") and even the simulation that runs it, if such things exist.
We don't know if pi is a disjunctive number, for what we know, though unlikely, the decimal representation of pi may only have a finite number of zeroes. It means we don't have the answer to your question.
How many more, though?
<Perfectionist>1.5in of error per few billion miles seems a bit sloppy, even though I'm sure it fits JPLs objectives just fine.</>
JPL uses imperial units?
It’s an education article, and the author mentions he first got the question from (presumably American) students so it makes sense he would answer in imperial units that an American middle schooler could understand.
How Many Decimals of Pi Do We Really Need? - https://news.ycombinator.com/item?id=30023489 - Jan 2022 (10 comments)
How Many Decimals of Pi Do We Really Need? (2016) - https://news.ycombinator.com/item?id=24616797 - Sept 2020 (147 comments)
How Many Decimals of Pi Do We Need? - https://news.ycombinator.com/item?id=24267042 - Aug 2020 (2 comments)
How Many Decimals of Pi Do We Really Need? (2016) - https://news.ycombinator.com/item?id=15801317 - Nov 2017 (3 comments)
How Many Decimals of Pi Do We Really Need? - https://news.ycombinator.com/item?id=11316401 - March 2016 (120 comments)
How Many Decimals of Pi Do We Really Need? - https://news.ycombinator.com/item?id=11315974 - March 2016 (1 comment)
How many articles on how many decimals of pi do we really need do we really need?
Deleted Comment
> And he made a molten sea, ten cubits from the one brim to the other: it was round all about, and his height was five cubits: and a line of thirty cubits did compass it round about.
1 Kings 7:23 King James
In the original Hebrew version of I Kings, in that verse the word for 'circumference' is traditionally written differently to how it is read (there are instances of this kind of thing all over the Bible [1])
Each letter in Hebrew has a numeric value [2].
As written: קוה = 111
As read: קו = 106
Ratio between them: 111/106 = 1.04717...
Which is exactly the ratio between the reported value of pi (3) and the real value to 4 decimal places (3.1415)
So maybe they did have a better idea than "3". The 3 in the verse is to keep it simple, but there's a clue there for those who want the real number.
[1] https://en.wikipedia.org/wiki/Qere_and_Ketiv
[2] https://en.wikipedia.org/wiki/Gematria
How many significant figures was it to? How accurate was construction and measuring techniques? 9.7 diameter would be reasonable as “10”, as would 30.47 being “30”, with values being well within 5%.
Deleted Comment
Dead Comment
> "Now, some fun facts: for a circle of radius 1000 miles, the value of "π" would be around 3.10867! For a 50 mile radius, "π" would be 3.14151. And even the engineers who built the Large Hadron Collider should have worried about the value of "π", since for a circular structure 2.7 miles in radius (which is the case for the LHC) "π" would be 3.141592415! So, we strongly encourage all high energy physicists and their sympathizers to celebrate Pi Day two minutes earlier than the rest of the world to honor our non-Euclidean geometry! As for the community of general relativity... we encourage them to redo all the calculations in a non-minkowskian metric for a non-massless Earth to know exactly when they should celebrate Pi Day. Also, advocates of the Indiana Pi Bill who root for legally making π equal to 3.2 should probably reconsider and change it to a value smaller than 3.1415926, since no circle on Earth would give them their desired result! Though if the surface of our planet was a saddle, that would be a completely different matter..."
https://physics.illinois.edu/news/34508
Paradoxically, double floats are engineered to provide more digits than you need because you need more digits than you need when engineering because if you don’t have insignificant digits to drop, you don’t have enough digits.
The "default" number of digits was chosen and became the default because it's enough for mostly everything.
Generally speaking, if you think you need more than double precision, what you really want is double precision and a better algorithm. Generally speaking.
Keep in mind that all of your actual measurements are going to be way less precise than double precision. Tools like LIGO can measure differences to better than double precision (1 part in 10^21, or something like that), but they're not actually making any measurements to that kind of precision, they're just measuring changes of that magnitude.
Though a lot of the time, the better algorithm is using an error accumulator-- so 2 doubles. This tends to outperform 80-bit extended precision, double-double, or long double arithmetic... but more precision would often also suffice and use the same amount of space.
Doubles have ~16 decimal digits of precision but adding a billion doubles together sequentially (simple summation) could with worst case data reduce your effective precision to only ~7 digits. Random data would tend to have a sqrt(n) effect which would leave you with ~11 digits.
Several algorithms have been devised to reduce or even eliminate this effect. Kahan summation for example typically results in the precision loss of a single addition, effectively eliminating the compound errors. https://en.wikipedia.org/wiki/Kahan_summation_algorithm
OK, so simulate the 10^30 atoms in my table, give me their spatio-temporal evolution in structure under gravity, etc. etc. How much preicision in pi do you need, when you are compounding interactions of 10^30 atoms each tick? Basically infinite.