Post Reply 
[VA] SRC #017 - April 1st, 2024 Spring Special
04-20-2024, 06:27 PM
Post: #19
RE: [VA] SRC #017 - April 1st, 2024 Spring Special
(04-19-2024 09:51 PM)Valentin Albillo Wrote:        
...So, the fractional part's limit is symbolically identified as:

          1 - \(\gamma\)

which is as can be expected because the Laurent series expansion of the \(\Gamma\) function near zero is:

         [Image: Gamma%20Laurent.jpg]

and you can see the  - \(\gamma\)  term there.


Additional comments:  Solver extraordinaire Gerson W. Barbosa tackled this mini-challenge extensively, correctly produced the limit to great accuracy and identified it as the Euler-Mascheroni \(\gamma\) constant, but he also tried to significantly improve the accuracy and said (my bold):
    "Here we also notice that the mantissas of the errors, the second column in the table, appear to tend to another constant. Regardless of any attempt to identify it, we can try to use it to get a few more correct digits, [...] Now we have about 50% more correct digits, 23"
but I think that his reasoning is circular because he's using the actual, externally-obtained 34-digit \(\gamma\) value (0.5772156649015328606065120900824024, as seen in his "L5th" program,) to compute the second column of the table in order to obtain the second constant (0.98905599...,) and use it to improve the result. In other words, he's using the real \(\gamma\) to improve the accuracy of his computed \(\gamma\), i.e. a circular way of proceeding.

As for the second constant's (0.98905599...) identification, it's mainly the O(z) term in the Laurent expansion above, namely:
\[ \frac{1}{12} (6 \gamma^2 + \pi^2) z\]

Hello, Valentín,

Yes, indeed that was a circular procedure. But then my interest had shifted to using these values of the Γ function to get γ on the calculator to full accuracy using less bytes than just writing the constant itself. Perhaps I should have used another label instead "L5th" for that one.

But I have managed to do it also in a non-circular way, as you can see from this later post:

(04-09-2024 05:19 PM)Gerson W. Barbosa Wrote:  But there’s a better way to get those extra digits. We only have to use the GAMMA function twice:

00 { 29-Byte Prgm }
01▸LBL "E_M"
02 1
03 -11
04 10↑X
05 GAMMA
06 LASTX
07 R↓
08 FP
09 -
10 R↑
11 +/-
12 GAMMA
13 FP
14 -
15 2
16 ÷
17 END


This will return

0.577215664901532860606565

Anyway, it is possible to get about the same accuracy with only one evaluation of the Γ function near zero without resorting to circular proceeding. We can ignore the higher-order terms and easily isolate γ in the Laurent series expansion you have mentioned above:

\[\gamma\approx\frac{1-\sqrt{1-\frac{z^2\pi^2}{6}+2\left({z\Gamma\left({z}\right)-1}\right)}}{z}\]

      N              (1-√(1-z²π²/6+2(zΓ(z)-1)))/z; z=10⁻ᴺ        
    -------------------------------------------------------
      1              0.585903128471302463502247124180713        
      2              0.57730596205274564964950936551113      
      3              0.5772165719234095045247918598371         
      4              0.577215673975865776232977270554       
      5              0.57721566499228031030482893493        
      6              0.5772156649024403392246767465        
      7              0.577215664901541935396815027        
      8              0.57721566490153295135441953       
      9              0.5772156649015328615139945        
     10              0.577215664901532860615600     
     11              0.57721566490153286060691        
     12              0.5772156649015328606039        
   --------------------------------------------------------



Best regards,

Gerson.


-----------------------------------------------------------

00 { 42-Byte Prgm }
01▸LBL "gamma"
02 +/-
03 10↑X
04 PI
05 RCL× ST Y
06 X↑2
07 6
08 ÷
09 RCL ST Y
10 GAMMA
11 RCL× ST L
12 LN
13 E↑X-1
14 STO+ ST X
15 -
16 1
17 X<>Y
18 -
19 SQRT
20 +/-
21 1
22 +
23 X<>Y
24 ÷
25 END
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [VA] SRC #017 - April 1st, 2024 Spring Special - Gerson W. Barbosa - 04-20-2024 06:27 PM



User(s) browsing this thread: 10 Guest(s)