Live data from Hacker News

All Rational Approximations of Pi Are Useless

blog.wolfram.com

101–110 of 113 posts

Re: All Rational Approximations of Pi Are Useless

#101
post #73
post #31

Earlier quoted context omitted.

((8^(5/4))^(((2/(0-(7+1)))^9)^(3-6))) = 2.718281848685499 ~ e +/- 2.0226453845140213e-08 That was fun. Although I'm having trouble confirming the answer... - Also I'm meant to be packing. http://play.golang.org/p/G_Y5SblSuv for some brute force eval :) Edit: This could be a nice demonstration for a genetic algorithm: A clearly defined fitness function yet an unknown (unknowable?) goal, and a distinct representation o…

I have one of those, a symbolic regressor (not genetic) lying around in a broken state. The last working version gave: short: 2981^ (1/8) less short: (2574 + 4903 ^ (1/4))/950 I used: http://apod.nasa.gov/htmltest/gifcity/e.1mil Perhaps I am misunderstanding your output but it is only correct up on till: 2.7182818

Oh sorry guys missed the digit concatenation bit. In that case I get:

  (9 - (5/7)^(1/2)) / 3 
I was tired when I saw that post, it was late/early. rmccue, I also seemed to have missed that you gave an error bound =(

Re: All Rational Approximations of Pi Are Useless

#102
post #64
post #46

Earlier quoted context omitted.

Nitpick: data compression theory says you can't have a general-purpose algorithm that on average compresses random strings. The best any algorithm can do is make some strings shorter and some strings longer, which is why compression is only useful on strings with known properties. But given a particular random finite string (such as N digits of pi) you can very likely (certainly?) find an algorithm that compresses it…

A simple way to look at it is kind of like the pigeon hole principle. If you imagine a binary string of length N. Then there are 2^N possible strings. To be losslessly compressed a string must be mapped uniquely to a string of length of at most 2^N - 1. So trivially, there are not enough strings to losslessly compress a binary string of length N to. But it is acceptable to talk about compression in terms of Kolmogoro…

> mapped uniquely to a string of length of at most 2^N - 1.

I think you mixed up lengths and number of values here. With 2^N - 1 it is the latter.

> Of course one can also show that KC does not compress most strings by much.

The problem of finding the Kolmogorov complexity of a string is undecidable, so I wonder if this statement is true.

Re: All Rational Approximations of Pi Are Useless

#103
post #61
post #59

Earlier quoted context omitted.

The point of the exercise is to find a short approximation of pi, no? If you allow the use of e, then you can define pi . What he wrote is not an approximation, it is pi. Surely at that point you've defeated the point of the exercise.

This is more-or-less my point. Once you allow sqrt and ln (or sqrt, log, and e) the problem is silly. He explicitly allows, see the bottom of the article, sqrt, log, and irrational numbers.

I think it's reasonable to assume he did not introduce imaginary and transcendental numbers.

Re: All Rational Approximations of Pi Are Useless

#104
post #84
post #76

Earlier quoted context omitted.

He's taking the % of the wrong number: the number you get after multiplying by three, not the original. I do what you do: 3, +10% + 5% (which is easy after getting the 10%).

It is easier to add 5% first, then triple, skipping the middle step.

Not for me- I get 10% to get the 5% so I have it anyway.

However, you could work from the 3 you've already used as the tripling in your model, then take 10% of that then 1/2 of that to get there. I've just never done it that way (these are things I just do without thinking too deeply about).

Re: All Rational Approximations of Pi Are Useless

#105
post #10

I think blog.wolfram.com is probably the best company blog I've seen, from a marketing perspective. A large number of the entries are basically of the form "Here is an interesting problem, and here's how I solved it with Wolfram products". They generally let the problem have the spotlight rather than focus on the Wolfram products, so it doesn't feel like you are getting pitched. Here's a related problem, but for e: u…

Yeah agree, they know how to market their stuff. (Maybe Alpha is a marketing instrument after all? ;))

However I think for this problem, and many others, mastering a general purpose programming language is much more efficient. After all you can pipeline symbolic expressions to Mathematica - or Maple >:) - and you have the best of both worlds. Or you just use Ruby or another highly expressive language - the syntax of simple symbolic expressions is basically the same.

Re: All Rational Approximations of Pi Are Useless

#106
post #99

Earlier quoted context omitted.

> The thing is: as pi is transcendental, there are very very good rational approximations in that sense (this is an old theorem due to Liouville) ... Expressed another way, for every estimate of Pi's value, however large, there are two integers that, expressed as a ratio, will produce the same result.

No, no, not at all: the meaning of the theorem is that there are amazingly accurate approximations for small sized denominators, that is.

I wasn't trying to summarize Liouville's Theorem, I was expressing a different idea. I didn't make that clear.

Re: All Rational Approximations of Pi Are Useless

#107
post #39

The reason that 22/7 is used to approximate pi is because it is convenient to calculate using a slide rule.

I would think most slide rules have a marker for pi that make this even easier.

Given how slide rules work, there would have to be a great number of marks, for the same reason that there cannot be only one unique ratio of integers that approximates Pi.

Re: All Rational Approximations of Pi Are Useless

#108

Earlier quoted context omitted.

The point is that you should just memorize whatever precision decimal you need. There's no shortcut like 22/7 that will magically give you more accuracy and be easy to memorize.

(pi - 22/7) < (pi - 3.14). 22/7 is closer to pi than 3.14.

Sure, but it's not closer than 3.142. You get less than one digit of bonus accuracy.

Re: All Rational Approximations of Pi Are Useless

#109
post #61

Earlier quoted context omitted.

This is more-or-less my point. Once you allow sqrt and ln (or sqrt, log, and e) the problem is silly. He explicitly allows, see the bottom of the article, sqrt, log, and irrational numbers.

I think it's reasonable to assume he did not introduce imaginary and transcendental numbers.

Not really.

Once he introduces the square root he introduces imaginary numbers, sqrt(-1), and transcendental numbers, for example the Gelfond–Schneider constant 2^sqrt(2).

Re: All Rational Approximations of Pi Are Useless

#110
post #109

Earlier quoted context omitted.

I think it's reasonable to assume he did not introduce imaginary and transcendental numbers.

Not really. Once he introduces the square root he introduces imaginary numbers, sqrt(-1), and transcendental numbers, for example the Gelfond–Schneider constant 2^sqrt(2).

Now we're really down the rabbit hole of someone else's intent, but personally, I assumed he was still trying to maintain some restriction. So, no imaginary numbers, no trascendental numbers. It's easy to restrict what we take the root of, and what we do with the potential irrational result of such roots, to ensure that. As you pointed out, to not do so defeats the purpose of the exercise, and I think my assumption is both reasonable and charitable.
Post reply on HN