153 points · by radicality · 2y ago · 280 comments
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 :-/
https://en.wikipedia.org/wiki/Guinness_World_Records#Change_...
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...
Double-double would be about 31 digits, and quad precision would get you 34.
Single-precision gets you a bit more than 7 digits.
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!
The general rule of thumb in numerical analysis is you need roughly twice the working precision as the output precision. Double-precision floating point has ~16 decimal digits of precision, which means the output should generally be good for ~8 decimal digits; with single-precision, you have ~7 decimal digits of working precision, or about ~3-4 decimal digits of output precision.
In other words, a 32-bit floating-point number doesn't leave with enough useful precision for many cases, whereas a 64-bit floating-point number is good for most use cases.
> 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.
It predates 8087! VAX had 64-bit floats with similar precision to IEEE 754 double precision. There's probably even older uses of 64-ish-bit floating-point types, but my knowledge of computers in the 60's and 70's is pretty poor. I fully expect you'd see similar results on those computers, though: you need enough decimal digits for working precision, and word-sized floating point numbers are just too small to have enough.
The 8087 itself doesn't use double precision types, it uses 80-bit types internally, which have 64 bits of mantissa (or ~19 decimal digits), although the reason for the 80-bit type is primarily to get higher precision for intermediate results on implementing transcendental functions.
I don’t think Kahan had a direct part in the design of the 8087. https://en.wikipedia.org/wiki/Intel_8087#Design_and_developm... agrees, saying “Palmer credited William Kahan's writings on floating point as a significant influence on their design.”
IOW, the likely reason for not storing more mantissa bits than that is someone involved in designing the 8087 determined that even NASA doesn't need more precision than that.
“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?
Floating point arithmetic is deterministic. As long as it is implemented as specified atan(1) has to give the floating point number which is the closest approximation to the real number pi/4 (in the current rounding mode), the multiplication by 4 means that precision can be lost and potentially your result is no longer the closest possible approximation to pi.
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...
[0] https://www.wolframalpha.com/input?i=93+billion+light+years+...
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.
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).
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.
A number that contains all other numbers infinitely many times (uniformly) would be called normal, but no one has managed to prove this for pi yet. In fact, no one even managed to prove that pi doesn't contain only 0s and 1s like the above after the X-th digit.
No. Example: 0.1011011101111011111... does never repeat, yet there is no 2 in there, neither is there 00 in there.
Put another way, the program which searches those works of art in the digits of pi will never finish (for a sufficiently complex work of art). And if it never finishes, does it actually exist?
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.
- it asked for my birthday (e.g. 25th Feb 1986) using a day / month / year form
- then converted to the m/dd/yy form (i.e. a string 22586),
- found that string in Pi,
- forgot my birthday and messed up displaying that somehow when converting back - saying that it found my birthday of 22 / 5 / 86
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
But it's also true that pi may not contain every _possible_ sequence of decimals, no matter what base you pick. Like the Riemann hypothesis, it seems very likely and people have checked a lot of statistics, but nobody has proven it beyond a (mathematical) shadow of doubt.
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
E: As the comments have pointed out, this requires the conjecture that Pi is normal to be true, was has not been proven or disproven yet.
https://en.m.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80...
So, you run your big calculation to get all XXX trillion digits on one machine, and run a completely different calculation to check, say, 1000 of those digits. If all match it's a pretty convincing argument that the calculation is correct.
I've met more than one pi braggart who expected me to marvel at their ability to recite digits, but couldn't answer 'what is pi though? Don't use numbers, use words'. And they just didn't know.
It's one of those weird domains we're people can possess deep knowledge and no understanding.
Here's the whole vod, if curious: https://www.youtube.com/watch?v=TZqTIXCrC3g
My younger brother was competing with me. He knows ~160 digits.
No special memory tricks - just repeatedly reading/reciting until they stuck.
I can understand that they have to mention them, but I think they’re overdoing it.
It'd probably be amusing to ask ChatGPT to rewrite the article so that every sentence contains "StorageReview Lab"...
And prices-per-digit so low we're practically giving them away !
StorageReview's server is a different beast, but it's kind of amazing that it gets similar capacity in only 2U.
So, does anybody know what interesting discoveries have come out of this process, besides a more precise Pi?
The simulation hypothesis is ridiculous in many other ways of course.
The Planck scale is the scale of lengths/times/etc that are around 1 in Planck units. This happens to be the scale roughly around which the quantum effects of gravity become significant. Since we do not have an accepted quantum theory of gravity, it's therefore the scale at which we cease to have an accepted physical theory.
There is no evidence to suggest that space is discrete at that scale. It's just the scale at which we have no accepted theory, and AFAIK no evidence to evaluate such a theory.
A discrete space-time would likely mean observable Lorentz-violations.
What's the python package to get that ? :-)
That or integers were and we should have an natural number of fingers and toes.
Either just the positives or the positives and zero.