Post Reply 
Natural logarithm of 2 [HP-15C/HP-42S/Free42 & others]
10-12-2019, 10:20 PM (This post was last modified: 10-13-2019 12:15 AM by Gerson W. Barbosa.)
Post: #8
RE: Natural logarithm of 2 [HP-15C/HP-42S/Free42 & others]
Here is an HP-41 equivalent of my previous HP-15C and HP-42S programs:


01 LBL "LN2"
02 RCL X
03 4
04 *
05 1
06 +
07 0
08 STO 00
09 LBL 00
10 RCL Y
11 +
12 RCL Z
13 X^2
14 X<>Y
15 /
16 R^
17 ST+ T
18 X<> T
19 X^2
20 ST- L
21 X<> L
22 1/X
23 ST- 00
24 RDN
25 DSE Z
26 GTO 00
27 +
28 1/X
29 RCL 00
30 +
31 END


4 XEQ LN2 -> 0.6931471808 ( ~ 2.9 seconds )

5 XEQ LN2 -> 0.6931471805 ( ~ 3.5 seconds )



P.S.: For the sake of completeteness, here is the formula I've been using:

\[\ln (2)\approx \sum_{n=1}^{k}\frac{1}{2n\left ( n+1 \right )}+\frac{1}{4k+1+\frac{1}{4k+1+\frac{4}{4k+1+\frac{9}{4k+1+\frac{\ddots }{ 4k+1+\frac{k^{2}}{4k+1}}}}}}\]

The known series together with this continued fraction correction terms yield about 2.09 digits per k. This comes from sheer observation, thus being provided with no proof. However, it appears to hold.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Natural logarithm of 2 [HP-15C/HP-42S/Free42 & others] - Gerson W. Barbosa - 10-12-2019 10:20 PM



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