Pi Approximation Day - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: General Forum (/forum-4.html) +--- Thread: Pi Approximation Day (/thread-13314.html) Pages: 1 2 |
RE: Pi Approximation Day - Albert Chan - 07-25-2019 01:26 PM Best Pi approximation using decimal digits permutations: 85910 / 27346 = 355 / 113 ≈ 3.141592920, abs error ≈ 2.67e-7 Proof: Since 355/113 is one of Pi's convergents, and the next convergent is 103993/33102 A better ratio, if exist, must be a semi-convergent: (52163+355k)/(16604+113k), k>=0 (52163+355k) + (16604+113k) (mod 9) ≡ 7 ≠ 0 Thus, better ratio does not exist. Update: With hex digits permutations, this produce best pi approximation 0xFE86C29B / 0x5104AD73 = 4270244507 / 1359261043 ≈ 3.141592653590, abs error ≈ 2.94e-13 RE: Pi Approximation Day - Gerson W. Barbosa - 07-25-2019 08:14 PM (07-24-2019 10:30 AM)BartDB Wrote:(07-23-2019 06:18 PM)Gerson W. Barbosa Wrote: That is, Similar equalities can be automatically obtained on the HP-50g with help of a small User-RPL program. The Egyptian Fractions part -- { } WHILE SWAP DUP -5. ALOG SQ > REPEAT DUP INV CEIL DUP UNROT INV - UNROT + END 6. ALOG SQ * SWAP -- is borrowed code from forumer 3298 here. For example, 22 ENTER 7 \<< / \->NUM DUP IP R\->I DUP UNROT - { } WHILE SWAP DUP -5. ALOG SQ > REPEAT DUP INV CEIL DUP UNROT INV - UNROT + END 6. ALOG SQ * SWAP NIP DUP SIZE NOT NOT { 1 - X SWAP ^ 0 + \GSLIST + } { DROP } IFTE 4 X 2 ^ 1 + / - COLLECT \>> EVAL --> '(X^8+X^6+3*X^2-1)/(X^2+1)' Indeed, '∫(0,1,(X^8+X^6+3*X^2-1)/(X^2+1),X)' EVAL DISTRIB --> '-π+22/7' That is, π = 22/7 - ∫(0,1,(X^8+X^6+3*X^2-1)/(X^2+1),X) Notice this is a different integrand polynomial. The original one is more elaborate so that the difference area is continuous, not distributed between both sides of the x-axis. Likewise, π = 377/120 - ∫(0,1,(X^61+X^59+X^9+X^7+3*X^2-1)/(X^2+1),X) and π = 3 + ∫(0,1,(-3*X^2+1)/(X^2+1),X) RE: Pi Approximation Day - Bill Duncan - 07-26-2019 11:02 PM Yeah, mine was always 355/113. I used it a lot (with 4-bangers!) before calculators became available with a dedicated Pi key. It was easy to remember and pretty darned accurate. RE: Pi Approximation Day - Gerson W. Barbosa - 08-14-2019 09:14 PM (07-22-2019 03:14 PM)Gerson W. Barbosa Wrote: Now, time for a little riddle. There hasn’t been any response to this puzzle, but it’s my fault. As I said, I forgot to mention something else had to be assumed. I will post the answer tomorrow, but I’ll give you another tip, in case you still want to give it a try. Remember numbers are not always what they look, as in the phrase “There are 10 types of people, those who understand binary and those who don’t”. RE: Pi Approximation Day - Leviset - 08-14-2019 09:36 PM See my latest post ‘Proving the Duffin-Schaeffer conjecture’- if I’d read this one first I’d have used it as a reply instead. RE: Pi Approximation Day - Albert Chan - 08-14-2019 10:46 PM (08-14-2019 09:14 PM)Gerson W. Barbosa Wrote: \(\frac{\frac{26}{7}-\frac{6}{11211}}{\left (\frac{4141}{3313}\right ) ^{\frac{3}{4}}}\) Puzzle solved If assumed all octal numbers, numerator converted back to decimal: 22/7 - 6/4745 = 104348/33215 = 3.141592654 (10 digits, rounded) This value happened to be one of Pi convergents, from continued fraction terms: [3;7,15,1,292,1] Thus, all is needed is to "remove" the denominator, by changing exponent to 0/4 RE: Pi Approximation Day - Gerson W. Barbosa - 08-14-2019 11:09 PM (08-14-2019 10:46 PM)Albert Chan Wrote:(08-14-2019 09:14 PM)Gerson W. Barbosa Wrote: \(\frac{\frac{26}{7}-\frac{6}{11211}}{\left (\frac{4141}{3313}\right ) ^{\frac{3}{4}}}\) Exactly, congrats! Perhaps I should have chosen a higher base to make it a bit more difficult to check :-) RE: Pi Approximation Day - Albert Chan - 08-15-2019 03:38 AM (08-14-2019 11:09 PM)Gerson W. Barbosa Wrote: Perhaps I should have chosen a higher base to make it a bit more difficult to check :-) It is even harder if the base goes negative. For negative base, we do not need the minus sign. Example, your original puzzle in negaoctal base: (166/7 + 6/172627) / (14241/15473)3/4 RE: Pi Approximation Day - Gerson W. Barbosa - 08-20-2019 04:10 PM (07-26-2019 11:02 PM)Bill Duncan Wrote: Yeah, mine was always 355/113. I used it a lot (with 4-bangers!) before calculators became available with a dedicated Pi key. It was easy to remember and pretty darned accurate. That's a really good one. (Made in China) |