Live data from Hacker News

All Rational Approximations of Pi Are Useless

blog.wolfram.com

71–80 of 113 posts

Re: All Rational Approximations of Pi Are Useless

#71
post #26

It is easier to mentally calculate the approximate circumference of a circle whose radius is a multiple of 7 using 22/7, than it is using 3.14(...) Admittedly, that's a pretty niche use, but a use, nonetheless.

3 X 7 = 21 and 7 X .14 is 7 X 10 X 1.5 - .07 with the appropriate decimal shift. Now I know it's something approaching 22, a detail 22/7 denies.

Re: All Rational Approximations of Pi Are Useless

#72

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.

It would have been better if I had specified absolute values in the formula. I hope the point came through. (It appears I'm unable to edit this particular comment.)

Re: All Rational Approximations of Pi Are Useless

#73
post #31
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…

((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

Re: All Rational Approximations of Pi Are Useless

#74
post #44
post #38

This is expected behavior. The best fractions are tied to the http://en.wikipedia.org/wiki/Continued_fraction representation of pi. The ones which have a chance of giving you several "free" digits are going to be tied to large terms in the representation. Glancing at http://oeis.org/A001203/b001203.txt gives you a sense that large terms are kind of rare. http://mathworld.wolfram.com/Gauss-KuzminDistribution.html quan…

This also makes sense from data compression theory. If the digits of an irrational / transcendental number share some of the properties of a random string, then you shouldn't be able to compress it. And finding a fractional representation with fewer total digits is a form of data compression.

Is the symbol for pi considered "compression"? Why or why not?

Re: All Rational Approximations of Pi Are Useless

#75

There are other reasons, though, that a rational approximation can be useful. If you're doing mental arithmetic, for example, multiplying by a fraction can be easier than multiplying by a decimal, but this depends on the specific numerator and denominator. In this way, 22/7 fails horribly, because multiplying by 22 and dividing by 7 are not particularly easy operations. For example, 100/32 is a less accurate represen…

using a rational version is also easier when using a slide rule

Slide rules usually have markings for common constants. And you can always add your own, if you’re careful enough.

Re: All Rational Approximations of Pi Are Useless

#76
post #63

Earlier quoted context omitted.

> optionally adding in a factor of 10% later You're better off not adding anything. If you could add 5% instead, then you'd be much better still.

Ideally you add 14%. Why do you say 5% (or nothing) is better than 10%?

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%).

Re: All Rational Approximations of Pi Are Useless

#77
post #18
post #16

Very neat: naive attempts to memorize Pi with rational-number shortcuts (i.e., fractions with integers in the nominator and denominator, such as 22/7 and 355/113) seem pointless, because getting more decimal digits of Pi right requires that one memorize a correspondingly larger number of digits in the numerator and/or denominator, defeating the purpose of these native attempts. -- PS. The author is offering a prize t…

I might be different, but 355/113 is very easy to remember and is not 7 unique segments of information. I just think "double the odds" 113355 We know we want a fraction, not a single number, so split down the middle: 113/355 And we know pi won't be less than 1, so flip it: 355/113. Knowing that the digits sequences are doubled lets you do some cheap, mental run length encoding. In a case where you need a hand calcula…

Unwillingly, I just memorized a Pi approximation.

Re: All Rational Approximations of Pi Are Useless

#78
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

"Digits may not be concatenated--for instance, you cannot get a 23 by simply placing the 2 next to the 3."

I think that renders both of your solutions invalid, but cool nonetheless!

Post reply on HN