My roommate in college had, while in high school, gone for a Guinness World Record memorizing the number of digits in pi. He memorized them out to 800 or so, then discovered another had memorized it to thousands, so he gave up.
In college, he figured out how to write a program to compute an arbitrary number of the digits of Pi. I asked him how did he know it was correct? He said "just look at it. The digits are right!"
We were limited in the use of the campus PDP-10 by a CPU time allotment per semester. He was planning to blow his allotment computing pi, he figured he could compute it to 15,000 digits or so. At the end of the term, he fired it up to run overnight.
The PDP-10 crashed sometime in the early morning, and his allotment was used up and had no results! He just laughed and gave up the quest.
Later on, Caltech lifted the limits on PDP-10 usage. Which was a good thing, because Empire consumed a lot of CPU resources :-/
> Later on, Caltech lifted the limits on PDP-10 usage. Which was a good thing, because Empire consumed a lot of CPU resources :-/
Knowing Caltech, there's a 50:50 chance that PDP is still running somewhere, torturing some poor postdoc in the astrophysics department because no one wants to upgrade it or port some old numerical code to a modern architecture.
In the 2001 film "Swordfish", there was always a piece of dialogue that stood out to me where Hugh Jackman describes code for a computer worm he wrote in college as being hidden on a PDP-10 I.T.S. machine kept online for history's sake. It's shown and noted that his character went to Caltech.
It is saying something that this might be the most plausible part of the film.
Funny timing. I was just musing about a middle-school classmate who endeavored to calculate as far as she could by hand and thinking how dated the idea was an hour ago. This was in the 90s, so it’s not as though we didn’t have computers. They just hadn’t reached mass-adoption in households.
I went to RPI's summer program for high school students in the mid 80s. I was hand assembling and linking assembly for a PDP-11 in the computer lab for a class, and I struck up a conversation with the sys admin of the "big" VAX-11 machine. The load over the summer on the VAX was low, so he was using the whole VAX to calculate the digits of pi. When I asked him "Why?", he said he hated to waste all those cycles. I remember less about the technical details of what he was doing than I do about PDP-11 assembly language. And pi is 3.1415927..., right?
Now that I am reading Meagher on octrees, I kind of wish I had met him--I think he was there at the time. I did get a tour of the image lab, and remember the colorful monkey on a monitor.
This new pi value should land us on the precise nanometer on a planetary rock of a sun located some 18 trillion light years away.
More than good enough for a Star Trek transporter targeting system, provided that sufficient power can reach it and able to compensate for planetary orbital speed, orbital curvature, surface axial rate, as well same value set for its solar system pathway around its galaxy, and its galaxy pathway thru its eyewatery cornucopia of galaxies.
But it may not be good enough for precise calculation of field interaction within a large group of elementary particles of quantum physics. Thanks to Heisenburg’s Indeterminacy Principle (aka Uncertainty Principle).
It's a shame they don't mention why they use specifically 15 digits (because of doubles?). Would give some satisfaction to why the specific amount after the explanation.
That NASA article kind of misses the point. NASA uses 15 digits for pi because that's the default and it is enough accuracy for them. The interesting question is why is that the default. That goes back to the Intel 8087 chip, the floating-point coprocessor for the IBM PC. A double-precision real in the 8087 provided ~15 digits of accuracy, because that's the way Berkeley floating-point expert William Kahan designed its number representation. This representation was standardized and became the IEEE 754 floating point standard that almost everyone uses now.
By the way, the first Ariane 5 launch blew up because of floating point error, specifically an overflow when converting a 64-bit float to an int. So be careful with floats!
This is why Star Trek transporters have “Heisenburg compensators”. Everyone knows that. And also that you have to disable them if you want to beam holographic objects off a holodeck.
In floating point arithmetic two consecutive operations can have an unbounded error. Just because the precision is good enough for one computation doesn't mean it is good enough for all computations.
You're also underestimating the accuracy by the absurd amount of roughly 10^202000000000000 ;)
You need ~ zero of the digits of the calculated pi to do OPs calculation.
[edit] My brains melting, I think I'm wrong and you are underestimating the underestimation of the accuracy by the absurd amount of roughly 10^42000000000000. OP is underestimating by 10^202000000000000.
Imagine I'm using pi = 3 (accuracy of 1 significant figure) that's an error of about 4.5% of π(pi), 3.1 is only 1.3% 3.14 only 0.05% with the error decreasing with each additional significant figure.
Imagine there's a circle with radius 1m and you've got a calculated bearing to it calculated using pi = 3 . In the worst case in 2 dimensions for every meter you walked you could be walking off to the side ~0.0225 meters (napkin maths) from where the circle really is, so it would only take the circle being ~45m away for you to walk right by it rather than through it. With pi =3.1 you're diverging ~0.0066m per meter so the circle would need to be ~152m away before there was a chance you'd miss it. 11 digits of pi gets you about 3 light years of walking before you had a chance of missing.
They were discussing (with a large degree of understatement,as discussed by others above) that this value of pi gives great precision in these kinds of calculations.
But why?
Serious question.
I'm sure something interesting/useful might come out of it, and even if it doesn't just go for it, but is there any mathematical truth that can be gleaned by calculating pi to more and more digits?
Not particularly, only thing I can think of is if we analysed it and saw there was some bias in the digits, but no one expects that (pi should be a 'normal number' [1]). I think they did it as a flex of their hardware.
Isn't there a non-zero chance that given an infinite number of digits, the probability of finding repeats of pi, each a bit longer, increases until a perfect, endless repeat of pi will eventually be found thus nullifying pi's own infinity?
The work was done by a team at "Storage Review", and the article talks a lot about how the were exercising the capabilities of their processor, memory, and storage architecture.
As pi never repeats itself, that also means that every piece of conceivable information (music, movies, texts) is in there, encoded. So as we have so many pieces of pi now, we could create a file sharing system that's not based on sharing the data, but the position of a piece of the file in pi. That would be kinda funny
> As pi never repeats itself, that also means that every piece of conceivable information (music, movies, texts) is in there, encoded.
This is true for normal numbers [1], but is definitely not true for all non-repeating (irrational) numbers. Pi has not been proven to be normal. There are many non-repeating numbers that are not normal, for example 0.101001000100001...
Storing the index into pi for a file would usually take something like as much space as just storing the file, and storing or calculating enough digits to use that index would be impossible with the technology of today (or even probably the next century).
It's conjectured to be normal isn't it? I know it hasn't been proven yet, and I cannot seem to find where I read this, but I thought there was at least statistical evidence indicating that it's probably normal.
The thinking is inspired by the Infinite Monkeys Theorem. Which does have an easy-to-understand mathematical proof (and the criticisms of said proof are more difficult to grasp).
Isn't it a property of infinity? If pi goes on infinitely without repeating itself, every possible combination of numbers appears somewhere in pi.
It's sort of like the idea that if the universe is infinitely big and mass and energy are randomly distributed throughout the universe, then an exact copy of you on an exact copy of Earth is out there somewhere.
This property of infinity has always fascinated me, so I'm very curious for where the logical fallacy might be.
It's not that shocking to me - you should try tutoring a class of mathematics undergrads! They make this class of error all the time. It's a "this sounds like it's obviously true, so the obvious reason must be right" kind of thing. Rigorous logic takes a lot of time to click for people.
feel free to prove me wrong. I never said it's efficient, the point is just that the information is out there. If pi has the following subnumbers 00, 01, 10, 11 in there, we can construct every perceivable data we can encode as binary. Even with 0 and 1. So we can construct a file by pointers to these four numbers. The bigger substrings we can match, the bigger the compression ratio. The set of pointers might even be way bigger than the file itself. It's nowhere near efficient or clever, but just entertaining
I don't think you can argue against IP because the way you arrange the pointers is IP itself, but still a funny thought experiment anyway
I'm not saying, that every piece of information is in there end to end, but that there are parts in there which can be used to construct it. I think I should've made the "encoded" part a bit more transparent haha. But I love the discussion that I kicked off!
There are many ways in which a number might not never repeat itself, but not contain all sequences (e.g. never use a specific digit). What you want is normal numbers and pi is not proven to be one (though probably it is).
you might find this to be pretty cool. It's similar to what you're describing. Whoever made it has an algorithm where you can look up "real" strings of text and it'll show you where in the library it exists. you can also just browse at random, but that doesn't really show you anything interesting (as you would expect given it's all random).
> every piece of conceivable information (music, movies, texts) is in there, encoded
Borges wrote a famous short story, “The Library of Babel,” about a library where:
“... each book contains four hundred ten pages; each page, forty lines; each line, approximately eighty black letters. There are also letters on the front cover of each book; these letters neither indicate nor prefigure what the pages inside will say.
“There are twenty-five orthographic symbols. That discovery enabled mankind, three hundred years ago, to formulate a general theory of the Library and thereby satisfactorily resolve the riddle that no conjecture had been able to divine—the formless and chaotic nature of virtually all books. . .
“Some five hundred years ago, the chief of one of the upper hexagons came across a book as jumbled as all the others, but containing almost two pages of homogeneous lines. He showed his find to a traveling decipherer, who told him the lines were written in Portuguese; others said it was Yiddish. Within the century experts had determined what the language actually was: a Samoyed-Lithuanian dialect of Guaraní, with inflections from classical Arabic. The content was also determined: the rudiments of combinatory analysis, illustrated with examples of endlessly repeating variations. These examples allowed a librarian of genius to discover the fundamental law of the Library. This philosopher observed that all books, however different from one another they might be, consist of identical elements: the space, the period, the comma, and the twenty-two letters of the alphabet. He also posited a fact which all travelers have since confirmed: In all the Library, there are no two identical books. From those incontrovertible premises, the librarian deduced that the Library is “total”—perfect, complete, and whole—and that its bookshelves contain all possible combinations of the twenty-two orthographic symbols (a number which, though unimaginably vast, is not infinite)—that is, all that is able to be expressed, in every language.”
I've done the (simple) math on this -- in fact I'm writing a short book on the philosophy of mathematics where it's of passing importance -- and the library contains some 26^1312000 books, which makes 202T look like a very small number.
So though everything you describe is encoded in Pi (assuming Pi is infinite and normal) we're a long, long way away from having useful things encoded therein...
Also, an infinite and normal Pi absolutely repeats itself, and in fact repeats itself infinitely many times.
I just submitted a sub-page of that site, which has some discussion that touches more on the layout of the library as described by Borges:
https://news.ycombinator.com/item?id=40970841
This is not necessarily true. Pi might not repeat but it could at some point - for example - not contain the digit 3 anymore (or something like that). It would never repeat, but still not have all conceivable information.
But the number 3 is there just because we decide to calculate digits in base 10. We could encode Pi in binary instead, and since it doesn't repeat it necessarily will never be a point where there will never be another 1 or a 0, right?
It would average the same size as the actual data. Treating the pi bit sequence as random bits, and ignoring overlap effects, the probability that a given n bit sequence is the one you want is 1/2^n, so you need to try on average 2^n sequences to find the one you want, so the index to find it is typically of length n, up to some second order effects having to do with expectation of a log not being the log of an expectation.
You need both index and length, I guess. If concatenating both value is not enough to gain sufficient size shrink, you can always prefix a "number of times still needed to recursively de-index (repeat,start-point-index,size) concatenated triplets", and repeat until you match a desired size or lower.
I don’t know if there would be any logical issue with this approach. The only logistical difficulty I can figure out is computing enough decimals and search the pattern in it, but I guess that such a voluminous pre-computed approximation can greatly help.
> every piece of conceivable information (music, movies, texts) is in there, encoded.
So that means that if we give a roomful of infinite monkeys an infinite number of hand-cranked calculators and an infinite amount of time, they will, as they calculate an infinite number of digits of pi, also reproduce the complete works of Shakespeare et al.
Isn't 202TB (for comparison) way too small to contain every permutation of information? That filesize wouldn't even be able to store a film enthusiast's collection?
Well it all comes down to encoding, doesn't it. We can represent almost everything with just 0 and 1 as well, can't we? The description of that data is way bigger than the elements used to describe it of course.
The sad thing is that the index would take just as much space as the data itself, because in average you can expect to find a n-bit string at the 2^n position.
Assuming we are only interested in base 10 and that pi contains e means that at some point in the sequence of decimal digits of pi (3, 1, 4, 1, 5, 9, 2, ...) there is the sequence of decimal digits of e (2, 7, 1, 8, 2, 8, ...), then I believe that question is currently unanswered.
Pi would contain e if and only if there are positive integers n and m such that 10^n pi - m = e, or equivalently 10^n pi - e = m.
We generally don't know if combinations of e and pi of the form a pi + b e where a and b are algebraic are rational or not.
Even the simple pi + e is beyond current mathematics. All we've got there is that at least one of pi + e and pi e must be irrational. We know that because both pi and e are zeros of the polynomial (x-pi)(x-e) = x^2 - (pi+e)x + pi e. If both pi+e and pi e were rational then that polynomial would have rational coefficients, and the roots of a non-zero polynomial with rational coefficients are algebraic (that is in fact the definition of an algebraic number) and both pi and e are known to not be algebraic.
In college, he figured out how to write a program to compute an arbitrary number of the digits of Pi. I asked him how did he know it was correct? He said "just look at it. The digits are right!"
We were limited in the use of the campus PDP-10 by a CPU time allotment per semester. He was planning to blow his allotment computing pi, he figured he could compute it to 15,000 digits or so. At the end of the term, he fired it up to run overnight.
The PDP-10 crashed sometime in the early morning, and his allotment was used up and had no results! He just laughed and gave up the quest.
Later on, Caltech lifted the limits on PDP-10 usage. Which was a good thing, because Empire consumed a lot of CPU resources :-/
[1] https://en.wikipedia.org/wiki/Akira_Haraguchi
Knowing Caltech, there's a 50:50 chance that PDP is still running somewhere, torturing some poor postdoc in the astrophysics department because no one wants to upgrade it or port some old numerical code to a modern architecture.
It is saying something that this might be the most plausible part of the film.
Now that I am reading Meagher on octrees, I kind of wish I had met him--I think he was there at the time. I did get a tour of the image lab, and remember the colorful monkey on a monitor.
Edit: And yes, over the years I've wasted many many hours on my Atari ST and Macs running Empires.
I should have attended a more geeky high school.
More than good enough for a Star Trek transporter targeting system, provided that sufficient power can reach it and able to compensate for planetary orbital speed, orbital curvature, surface axial rate, as well same value set for its solar system pathway around its galaxy, and its galaxy pathway thru its eyewatery cornucopia of galaxies.
But it may not be good enough for precise calculation of field interaction within a large group of elementary particles of quantum physics. Thanks to Heisenburg’s Indeterminacy Principle (aka Uncertainty Principle).
"For JPL's highest accuracy calculations, which are for interplanetary navigation, we use 3.141592653589793" (15 digits).
How Many Decimals of Pi Do We Really Need? : https://www.jpl.nasa.gov/edu/news/2016/3/16/how-many-decimal...
By the way, the first Ariane 5 launch blew up because of floating point error, specifically an overflow when converting a 64-bit float to an int. So be careful with floats!
“atan(1) * 4”
casts to double?
- I wonder if this cast is always correct in C [ie.: math.h], no matter the datatype and/or the number base?
It’s just good science.
40 digits or so will get you that...
Here's the WolframAlpha equation to your assertion of 40-digit ... or so.
https://www.wolframalpha.com/input?i=%28180+x+17+trillion+li...
You're also underestimating the accuracy by the absurd amount of roughly 10^202000000000000 ;)
You need ~ zero of the digits of the calculated pi to do OPs calculation.
[edit] My brains melting, I think I'm wrong and you are underestimating the underestimation of the accuracy by the absurd amount of roughly 10^42000000000000. OP is underestimating by 10^202000000000000.
What does this mean?
Imagine there's a circle with radius 1m and you've got a calculated bearing to it calculated using pi = 3 . In the worst case in 2 dimensions for every meter you walked you could be walking off to the side ~0.0225 meters (napkin maths) from where the circle really is, so it would only take the circle being ~45m away for you to walk right by it rather than through it. With pi =3.1 you're diverging ~0.0066m per meter so the circle would need to be ~152m away before there was a chance you'd miss it. 11 digits of pi gets you about 3 light years of walking before you had a chance of missing.
They were discussing (with a large degree of understatement,as discussed by others above) that this value of pi gives great precision in these kinds of calculations.
[1] https://en.wikipedia.org/wiki/Normal_number
The suspense is killing me.
Dead Comment
This is true for normal numbers [1], but is definitely not true for all non-repeating (irrational) numbers. Pi has not been proven to be normal. There are many non-repeating numbers that are not normal, for example 0.101001000100001...
Storing the index into pi for a file would usually take something like as much space as just storing the file, and storing or calculating enough digits to use that index would be impossible with the technology of today (or even probably the next century).
[1] https://en.wikipedia.org/wiki/Normal_number
may I interest you in the difference between *irrational* numbers and *normal* numbers?
look at https://en.wikipedia.org/wiki/Liouville_number - no repeats, but minuscule "contained information"
It is somewhat shocking that again and again this logical fallacy comes up. Why do people think that this is true? It doesn't even sound true.
It's sort of like the idea that if the universe is infinitely big and mass and energy are randomly distributed throughout the universe, then an exact copy of you on an exact copy of Earth is out there somewhere.
This property of infinity has always fascinated me, so I'm very curious for where the logical fallacy might be.
feel free to prove me wrong. I never said it's efficient, the point is just that the information is out there. If pi has the following subnumbers 00, 01, 10, 11 in there, we can construct every perceivable data we can encode as binary. Even with 0 and 1. So we can construct a file by pointers to these four numbers. The bigger substrings we can match, the bigger the compression ratio. The set of pointers might even be way bigger than the file itself. It's nowhere near efficient or clever, but just entertaining
I don't think you can argue against IP because the way you arrange the pointers is IP itself, but still a funny thought experiment anyway
I'm not saying, that every piece of information is in there end to end, but that there are parts in there which can be used to construct it. I think I should've made the "encoded" part a bit more transparent haha. But I love the discussion that I kicked off!
you might find this to be pretty cool. It's similar to what you're describing. Whoever made it has an algorithm where you can look up "real" strings of text and it'll show you where in the library it exists. you can also just browse at random, but that doesn't really show you anything interesting (as you would expect given it's all random).
...and can't because there is no original corpus that the locality hashing algorithm can use as a basis
Borges wrote a famous short story, “The Library of Babel,” about a library where:
“... each book contains four hundred ten pages; each page, forty lines; each line, approximately eighty black letters. There are also letters on the front cover of each book; these letters neither indicate nor prefigure what the pages inside will say.
“There are twenty-five orthographic symbols. That discovery enabled mankind, three hundred years ago, to formulate a general theory of the Library and thereby satisfactorily resolve the riddle that no conjecture had been able to divine—the formless and chaotic nature of virtually all books. . .
“Some five hundred years ago, the chief of one of the upper hexagons came across a book as jumbled as all the others, but containing almost two pages of homogeneous lines. He showed his find to a traveling decipherer, who told him the lines were written in Portuguese; others said it was Yiddish. Within the century experts had determined what the language actually was: a Samoyed-Lithuanian dialect of Guaraní, with inflections from classical Arabic. The content was also determined: the rudiments of combinatory analysis, illustrated with examples of endlessly repeating variations. These examples allowed a librarian of genius to discover the fundamental law of the Library. This philosopher observed that all books, however different from one another they might be, consist of identical elements: the space, the period, the comma, and the twenty-two letters of the alphabet. He also posited a fact which all travelers have since confirmed: In all the Library, there are no two identical books. From those incontrovertible premises, the librarian deduced that the Library is “total”—perfect, complete, and whole—and that its bookshelves contain all possible combinations of the twenty-two orthographic symbols (a number which, though unimaginably vast, is not infinite)—that is, all that is able to be expressed, in every language.”
I've done the (simple) math on this -- in fact I'm writing a short book on the philosophy of mathematics where it's of passing importance -- and the library contains some 26^1312000 books, which makes 202T look like a very small number.
So though everything you describe is encoded in Pi (assuming Pi is infinite and normal) we're a long, long way away from having useful things encoded therein...
Also, an infinite and normal Pi absolutely repeats itself, and in fact repeats itself infinitely many times.
https://www.piday.org/find-birthday-in-pi/
https://libraryofbabel.info/
I just submitted a sub-page of that site, which has some discussion that touches more on the layout of the library as described by Borges: https://news.ycombinator.com/item?id=40970841
I don’t know if there would be any logical issue with this approach. The only logistical difficulty I can figure out is computing enough decimals and search the pattern in it, but I guess that such a voluminous pre-computed approximation can greatly help.
So that means that if we give a roomful of infinite monkeys an infinite number of hand-cranked calculators and an infinite amount of time, they will, as they calculate an infinite number of digits of pi, also reproduce the complete works of Shakespeare et al.
Wouldn't the encoded information have to have a finite length? For example, pi doesn't contain e, does it?
Assuming we are only interested in base 10 and that pi contains e means that at some point in the sequence of decimal digits of pi (3, 1, 4, 1, 5, 9, 2, ...) there is the sequence of decimal digits of e (2, 7, 1, 8, 2, 8, ...), then I believe that question is currently unanswered.
Pi would contain e if and only if there are positive integers n and m such that 10^n pi - m = e, or equivalently 10^n pi - e = m.
We generally don't know if combinations of e and pi of the form a pi + b e where a and b are algebraic are rational or not.
Even the simple pi + e is beyond current mathematics. All we've got there is that at least one of pi + e and pi e must be irrational. We know that because both pi and e are zeros of the polynomial (x-pi)(x-e) = x^2 - (pi+e)x + pi e. If both pi+e and pi e were rational then that polynomial would have rational coefficients, and the roots of a non-zero polynomial with rational coefficients are algebraic (that is in fact the definition of an algebraic number) and both pi and e are known to not be algebraic.
You reminded me of this Person of Interest clip: https://www.youtube.com/watch?v=fXTRcsxG7IQ
https://m.youtube.com/watch?v=yGmYCfWyVAM