05-29-2026 11:05 AM
I just saw a funny meme about a fraction that approximated PI to 2600 digits. That got me thinking of trying to find some, and this was my result!
22/7 (the real PI day) is surprisingly good at such a simple fraction. 355/113 is a really good approximation and you need to get to 99733/31746 to get the best 5 digit one. With the last one it's correct to 10 digits!
05-29-2026 11:20 AM
What we really need is a TAU day...
More PI for everyone!
05-29-2026 12:44 PM - edited 05-29-2026 12:58 PM
Cool!
Hey, this is 2026, so why not use a map instead of variant attributes?
On a side note, you could gain about 10-20% by just replacing the format into decimal string with a typecast. 😄
One flaw is that the third and fourth item have the same ratio
05-29-2026 02:18 PM
Here's a quick draft that is about 50x faster. but leaves out digit groups that show no improvement. Probably has some bugs. 😄
05-29-2026 05:46 PM - edited 05-29-2026 05:53 PM
@altenbach wrote:
Here's a quick draft that is about 50x faster. but leaves out digit groups that show no improvement. Probably has some bugs. 😄
IMHO, when slicing up pi it is important to determine if there really are any bugs. Just guessing that they exist and serving them up anyway is making my laugh my a** off!
EDIT: I was just informed that my reaction is irrational.
05-30-2026 09:47 AM
@JÞB wrote:
EDIT: I was just informed that my reaction is irrational.
You are a COMPEX individual. 😄
My main concern were actually inherited from the original code. For example I did not understand where the 3183000 constant comes from. I initially made one with a while loop that terminated after checking all numbers up to a certain number of digits. This was slower, but still 10x faster than the original.
05-30-2026 11:04 AM - edited 05-30-2026 11:12 AM
@altenbach wrote:
@JÞB wrote:
EDIT: I was just informed that my reaction is irrational.You are a COMPEX individual. 😄
Not really 😕 Whenever I see numbers that are imaginary I tend to grab an oar and rho in any direction. (Which brings the thread back 2pi)
<rimshot>
05-30-2026 12:01 PM
Keeping it real. 😄
05-30-2026 08:31 PM
Paradoxically, using complex realm can simplify the math. In AC circuit analysis, if you stay in the domain of real numbers, you need trigonometry; however if you venture into the domain of complex numbers, you only need linear algebra.
05-30-2026 09:49 PM - edited 05-30-2026 09:51 PM
@paul_a_cardinale wrote:
Paradoxically, using complex realm can simplify the math. In AC circuit analysis, if you stay in the domain of real numbers, you need trigonometry; however if you venture into the domain of complex numbers, you only need linear algebra.
If you stay in Cartesian coordinates. The linear algeba rolls up to simple vector addition when using Polar coordinates.