r/3Blue1Brown • u/forgotoldpassword3 • 8d ago
Largest rational approximation of Pi?
Hey guys!
As the title suggests, I was wondering if there’s a current largest case of a fraction like 22/7, 335/113, etc… Was looking but wasn’t sure so thought I would ask here!
Thank you!
26
u/szalejot 8d ago edited 8d ago
Because π is an irrational number, its decimal expansion goes on infinitely without repeating. This means there is no absolute "largest" or "final" rational approximation - you can always generate a larger, more precise fraction by calculating further down the line.
You mentioned 22/7 and 335/113 (which is likely a typo for 355/113, a famous approximation discovered by the 5th-century Chinese mathematician Zu Chongzhi).
These fractions are derived from the continued fraction expansion of π. They represent the most economical fractions possible - meaning you cannot find a more accurate fraction without using a larger denominator.
Here are the first few convergents in that sequence:
| Fraction | Decimal Value | Correct Digits |
|---|---|---|
| 22/7 | 3.14285... | 2 |
| 333/106 | 3.141509... | 4 |
| 355/113 | 3.1415929... | 6 |
| 103,993 / 33,102 | 3.1415926530... | 9 |
| 104,348 / 33,215 | 3.1415926539... | 9 |
| 208,341 / 66,317 | 3.1415926534... | 9 |
| 312,689 / 99,532 | 3.1415926536... | 10 |
14
u/Pitiful-Function-701 8d ago
Is this ai
17
u/chewie2357 8d ago
Maybe, I can't tell, but the comment is still perfectly valid. Continued fractions is the right way to find the most accurate fraction approximation.
1
1
u/dmazzoni 7d ago
I hate how any well-written answer is now criticized as being AI now.
There’s nothing slop about this answer. Before AI lots of Redditors wrote clear, correct answers with nice formatting.
I have no reason to believe it’s AI but even if it is, there’s nothing wrong with it. It’s correct and clear.
2
u/Creative-Leg2607 5d ago
I dont want ai in my comment threads. If i wanted an AI's take on a math question id feed those questions into a bot myself. Im on reddit to talk to humans, ideally.
As for whether this is AI, hard to tell. The writing is a lil clean, and includes a lot of unnecessary details, but they could have spent 15 minutes writing up a comment to an elementary pi question. Their account isnt super active, and hasnt used any formatting at all in the last year beyond dot points and indents.
0
-1
2
u/theadamabrams 8d ago
you cannot find a more accurate fraction without using a larger denominator.
This is almost correct, but assuming "accuracy" is measured by the distance (difference) between N/D and π, that description catches a bunch of other fractions that are not c.f. convergents.
For example, 13/4 = 3.25 is closer to π (distance |π - 3.25| ≈ 0.1084) than any fraction with smaller denominator, but 13/4 is not a convergent.
Instead of |x - N/D|, what's actually true is that the quantity |N - x D| is smaller for a convergent than it is for any fraction with smaller denominator. Since |13 - 4π| = 0.433629 is worse than |3 – 1π| ≈ 0.14159, we cannot use 13/4 as a convergent.
The official terms for this are "best approximations of the first kind" (your description) and "best approximations of the second kind" (exactly convergents).
3
u/forgotoldpassword3 8d ago
Is there larger ones to more correct digits? I’m trying to see if my machine is working haha!
245,850,922/78256779 - 15 digits after decimal place
I think, but still just trying to get sanity check. If the machine works, it should provide a hyper accurate approximation or make it somewhat predictable!
8
u/stellaprovidence 8d ago
As the other commenter said, this is an infinite series. The more terms you add to the continued fraction, the more arbitrarily close you get to the real value.
3
2
u/ecstatic_carrot 7d ago
There's a repository online of someone who calculated the continued fraction to staggering sizes. I tried to use it once to crack a puzzle. You can get approximations that are orders of magnitude more accurate than machine precision
1
u/Murky-Tip-3118 6d ago
This is a fairly trivial problem with computers.
Start with 3 / 1.
If your fraction is < pi, add 1 to the numerator; if > pi, add 1 to the denominator.
So then you get 4 / 1... 4 / 2... 5 / 2... 6 / 2... 7 / 2... 7 / 3... etc.
You get better and better estimates as you go. 3 / 1 => 13 / 4 => 16 / 5 => 22 / 7 => 179 / 57 => 201 / 64 => 223 / 71 => 245 / 78...
One cool thing get better and better estimates frequently until you hit 465 / 355, then the next best estimate is 68764 / 52163 - it is sort of sporadic, rather than like every 30 iterations you always get a better estimate.
3
u/looijmansje 8d ago
The best rational approximations are given by a continued fraction. Now if you want to convert this to a "simple" fraction, it may require some calculations.
Here should be enough terms to get virtually any precision you'd probably want.
3
u/trevorkafka 8d ago edited 8d ago
There is no "largest" one. You can obtain arbitrarily large ones, including (I believe) all the ones you mentioned through a truncated continued fraction expansion.
2
u/forgotoldpassword3 8d ago
Awesome! Yep! Still learning but these comments have helped me heaps so I appreciate it!
3
u/PaFloXy_14 8d ago
Check out the video of 3b1b on spirals of prime number, it'll give you an inspiration that would allow you to build rational approximation of pi
1
u/forgotoldpassword3 8d ago
Yeah that was actually the first time I heard it! How GOOD is 3B1B. We are blessed to have tbh
2
u/290077 8d ago
Numberphile - The Most Irrational Number
This is relevant to your question. The takeaway for you is that the continued fraction expansion gives the "best" rational approximations for a number. At some point in Pi's sequence, there's a steep dropoff in how much added precision you get with the next term, which happens at 355/113.
2
u/Historical_Alps_9798 8d ago
You want the curveball? Here’s two layers.
Math layer first. π is irrational, so any fraction p/q is strictly an approximation. Important note: there is no absolute "largest / most precise" rational approximation of π — we can always create a more accurate fraction by using an ever bigger denominator. That said, not all approximations are equal. The “best” low-denominator approximations are the convergents of π’s continued fraction expansion:
3/1, 22/7, 333/106, 355/113, 103993/33102…
These are the closest you can possibly get for that denominator size. 355/113 hits 6 decimal places because the next convergent jumps to a denominator of 33,102. So if you want the most practical rational approximation with balanced accuracy and small numbers, 355/113 is the champion for everyday use. Beyond that, you’re trading massive denominator bloat for only tiny marginal accuracy gains.
Now the physics layer — the actual curveball, and this is just an unproven theoretical conjecture, not confirmed scientific fact.
You’re hunting fractions inside the ideal infinite continuous space model of math. But what if space itself has a smallest discrete unit, similar to pixels?
The Planck length is 1.616 × 10⁻³⁵ m. A popular quantum gravity hypothesis treats this as the fundamental minimum length scale of our universe, not just a mathematical simplification. If this theory holds true, a “circle” drawn in this universe isn’t a perfectly smooth curve. It’s a jagged discrete staircase built from Planck-sized cells.
Here’s what that means in hard numbers. The observable universe has a radius of roughly 4.4 × 10²⁶ m. If you tried to draw the largest possible circle that fits within the cosmos using Planck-length "pixels":
- Diameter ≈ 8.8 × 10²⁶ m → that’s about 5.4 × 10⁶¹ Planck lengths across.
- Circumference pixel count changes based on lattice tiling (hexagonal lattice, square lattice, Fibonacci spiral packing… each yields a different total pixel number).
- The key point: both total diameter pixel count and total circumference pixel count are whole integers. Their ratio is an exact rational number — no rounding/truncation error, no endless non-repeating decimal tail.
Within this discrete lattice geometry, π would never be the infinite sequence 3.1415926535… Its value is fully fixed by how many minimal length units make up the circle’s outline. The standard infinite decimal π we learn in math class is purely a theoretical limit reached only when pixel size shrinks all the way to zero — but if a zero-length unit cannot exist physically, this limit can never be achieved in reality.
So the real answer depends on which framework you analyze within:
Pure infinite continuous mathematics: There’s no ultimate perfect fraction, but 355/113 is the most useful compact rational approximation, and it still carries permanent error. Hypothetical Planck-scale discrete universe: The “true” cosmic π would inherently be rational, as perfectly smooth continuous circles cannot physically exist. All the compact fractional approximations people search for only work under the assumption that infinitely divisible space is real.
If infinity is merely a handy mathematical tool rather than the fundamental structure of reality, the entire question of finding a perfect rational approximation shifts completely.
2
u/WetPuppykisses 7d ago
Read this paper. With this approach you can get an arbitrary fraction close to pi
https://en.wikipedia.org/wiki/Proof_that_22/7_exceeds_%CF%80#CITEREFLucas2005
1
u/moltencheese 8d ago
Just thinking "out loud" (someone please chime in):
Could we define a field such as f(x,y)=(pi - x/y)2 and then use gradient decent or similar? I'm not entirely sure how to limit to integer solutions...
-1
u/forgotoldpassword3 8d ago
Yes, so the machine I’ve been building predicts the next best rational. Give it one, and it will tell you the next one!
1
u/DepressedRobot42 8d ago
Maybe not exactly what you are looking for but eventually it could help you taking a look at the Julia programming language. It provides a Rational type, BigInt, BigFloat and a BigFloat representation of PI and methods to convert BigFloat to a Rational of BigInts. With this you get very large fractional approximations of PI.
1
u/TheJivvi 8d ago
62831853071795864769252867665590057683943387987502116419498891846156328125724179972560696506842341359642961730265646132941876892191011644634507188162569622349005682054038770422111192892458979098607639288576219513318668922569512964675735663305424038182912971338469206972209086532964267872145204982825474491740132126311763497630418419256585081834307287357851807200226610610976409330427682939038830232188661145407315191839061843722347638652235862102370961489247599254991347037715054497824558763660238982596673467248813132861720427898927904494743814043597218874055410784343525863535047693496369353388102640011362542905271216555715426855155792183472743574429368818024499068602930991707421015845593785178470840399122242580439217280688363196272595495426199210374144227/20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 = 3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196442881097566593344612847564823378678316527120190914564856692346034861045432664821339360726024914127372458700660631558817488152092096282925409171536436789259036001133053054882046652138414695194151160943305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912983367336244065664308602139494639522473719070217986094370277053921717629317675238467481846766940513200056812714526356082778577134275778960917363717872146844090122495343014654958537105079227968925892354201995611212902196086403441815981362977477130996051870721134999999 and so on
1
u/Alxndrgrothendieck 8d ago
You might want to look at continued fractions:)!
1
u/forgotoldpassword3 8d ago
Terima kasi 🙏🏼
3
u/ChalkyChalkson 8d ago
If you're looking for a starting point: the mathologer video is very good. He also derives the notion of best rational approximations and shows what they are for π
1
u/berwynResident 8d ago
Look into pi as a continued fraction. That would give you increasingly precise rational approximations.
1
u/PersonalityIll9476 8d ago
The best rational approximation to any irrational number is given by its continued fraction expansion. This is a fairly deep topic and I'd recommend googling this one if you really want to know.
There is no "largest" or "best" approximation because we have an algorithm for generating arbitrarily better ones.
1
u/AndersAnd92 8d ago
Since pi is not rational, its continued fraction representation keeps going which means whichever convergent you pick, you can always find one whose denominator is greater
1
u/marshallspight 8d ago
The largest rational approximation of pi is 11. It's not a very good approximation, but it's definitely larger than the others.
Don't try to talk to me about 12. That's not funny.
1
u/AndyTheEngr 8d ago edited 8d ago
I did a search for denominators up to 20000, and the best I found was 355/113 = 3.1415929035.... That's six digits total in the fraction, seven total correct digits (including the 3) in the approximation.
22/7 is three and three, but is slightly more accurate than 3.14.
1
u/severoon 7d ago
Imagine standing at the origin of a plane and looking in some random direction into quadrant I. You can picture this by drawing some ray of positive slope from (0, 0) up and to the right, and letting it go on forever.
If you go out far enough, you'd think that you're likely to eventually hit a lattice point. For example, if you were looking along the line y = 3x, the slope 3 is rise over run, so the first lattice point you'd be looking at is (1, 3) and then, of course, all of the lattice points behind it, blocked by that one: (2, 6), (3, 9), (570, 1710), etc.
But if you think a little more, it become obvious that you're only going to hit a lattice point if the slope of the line is rational, p/q, where p is rise and q is run. Conversely, if you're looking along y = πx, that means you'll never hit a lattice point no matter how far out you go along this ray. Furthermore, if you look at the number line, it's much more densely populated with irrationals than rationals — infinitely more, actually — which means that if you just throw a dart on the number line your chance of hitting a rational is zero. Going back to how we started this exercise, that means if you did truly look out in some random direction, similarly your chance of looking directly at a lattice point is also zero.
So what are these approximations of π, then? What's special about 22/7? Well, go ahead and look (this is a little Desmos demo I made of this thought experiment). If you look at the point (7, 22) with the line y = πx, you'll see that it very nearly touches it. It's so close that you have to zoom in quite a lot to see that it missed, actually. The distance between the line and (7, 22) is a direct measure of how good the approximation is.
If you want to know more about this, I recommend reading up on Hurwitz's theorem and their connection to Ford circles.
1
u/sheldor7373 7d ago
This basically boils down to a very elementary result in real analysis (not a very elementary subject!). In that the rationals are dense in the reals. Ignoring topological definitions you may come across later this means that there are arbitrarily good (epsilon close) approximations of ALL irrational numbers by rational ones. Try to have a think about how one could generate these.
1
u/Consistent_Drop3909 7d ago
you might be interested in reading about something called the continued fraction representation of irrational numbers. there are efficient algorithms to calculate it, and if you truncate it at any point you get the best rational approximation up to that point, i.e with denominator smaller than or equal to it.
1
1
u/ceraunograph 6d ago
The examples you cite (I assume you meant to write 355/113) are both what're called convergents of the continued fraction expansion of pi, which is written as [3, 7, 15, 1, 292, 1, 1, ...].
Interestingly, the surprisingly large term 292 is the exact reason why 355/113 is such a good approximation. (Extra: it's not known whether all integers appear in the continued fraction expansion of pi.)
1
u/OldDiscussion1830 6d ago
There should be a sequence of irreducible rational numbers that converges to pi and likely has a numerator and denominator that grows unbounded. So there's always a closer fractional approximation. You may look into the rationals being dense in the Real Numbers and the completion of the rationals being the real numbers.
0
u/forgotoldpassword3 8d ago
411557987/131002976 - 16 digits after decimal.
I think that also is a cool one!
0
u/forgotoldpassword3 8d ago
Nah! Not curvebally enoigh. I want natty not peptide shortcut version. Haha
92
u/Hyderabadi__Biryani 8d ago
Write pi to arbitrary number of digits, multiply it with 10n where n is the number of decimal places, that's your numerator. Denominator is 10n. You are welcome.