Post Reply 
Calculation of pi on many machines
11-24-2020, 08:57 AM
Post: #15
RE: Calculation of pi on many machines
On my HP-42S, using my code and my formula:
12 digits in 1.7"

:-)


00 { 55-Byte Prgm }
01▸LBL "π"
02 4
03 0
04 8
05 RCL× ST T
06 RCL+ ST Z
07▸LBL 00
08 R↑
09 RCL+ ST X
10 STO× ST X
11 STO× ST T
12 DSE ST X
13 STO÷ ST T
14 X<>Y
15 STO+ ST Z
16 X<> ST Z
17 STO÷ ST Y
18 X<> ST L
19 R↓
20 X<>Y
21 DSE ST T
22 GTO 00
23 DSE ST X
24 +
25 1/X
26 0.5
27 +
28 ×
29 END


5 XEQ π →

3.14159265358



\(\pi \approx \left ( \frac{4}{3} \times \frac{16}{15}\times \frac{36}{35}\times\frac{64}{63} \times \cdots \times \frac{ 4n ^{2}}{ 4n ^{2}-1}\right ) \left ( 2+\frac{4}{8n+3+\frac{3}{8n+4+\frac{15}{8n+4+ \frac{35}{8n+4 + \frac{63}{\dots\frac{\ddots }{8n+4+\frac{4n^{2}-1}{8n+4}}} }}} } \right )\)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Calculation of pi on many machines - Gerson W. Barbosa - 11-24-2020 08:57 AM



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