Post Reply 
Wallis' product exploration
02-11-2020, 12:53 AM
Post: #15
RE: Wallis' product exploration
(02-09-2020 10:58 PM)Gerson W. Barbosa Wrote:  Convergence gets worse as n increases, but it won’t take long before you can recognize the constant.

This is better:

Code:


00 { 97-Byte Prgm }
01▸LBL "WALLIS"
02 STO 03
03 STO 04
04 0
05 STO 00
06 1
07 STO 01
08▸LBL 00
09 1
10 STO+ 00
11 RCL 00
12 X↑2
13 4
14 ×
15 ENTER
16 X<>Y
17 1
18 -
19 ÷
20 STO× 01
21 RCL 01
22 DSE 03
23 GTO 00
24 STO+ ST X
25 512
26 RCL× 04
27 RCL ST X
28 832
29 +
30 RCL× 04
31 592
32 +
33 RCL× 04
34 167
35 +
36 X<>Y
37 704
38 +
39 RCL× 04
40 464
41 +
42 RCL× 04
43 105
44 +
45 ÷
46 ×
47 END

19 XEQ WALLIS ->

3.1415926535(94170710602783580375138)

1000 XEQ WALLIS ->

3.14159265358979323846264(8085575516)


The first program should be changed accordingly. After 15 iterations a physical 42S will return 3.14159265353.

The correction factor is

(n (n (512 n + 832) + 592) + 167)/(n (n (512 n + 704) + 464) + 105)


That’s five terms of a continued fraction in Horner form. I have yet to check whether it generalizes for infinite terms or not.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Wallis' product exploration - pinkman - 02-07-2020, 10:55 PM
RE: Wallis' product exploration - pinkman - 02-08-2020, 02:42 PM
RE: Wallis' product exploration - Allen - 02-08-2020, 07:13 PM
RE: Wallis' product exploration - Allen - 02-08-2020, 08:58 PM
RE: Wallis' product exploration - pinkman - 02-09-2020, 05:44 AM
RE: Wallis' product exploration - Allen - 02-08-2020, 08:13 PM
RE: Wallis' product exploration - Allen - 02-09-2020, 01:08 PM
RE: Wallis' product exploration - Allen - 02-09-2020, 01:57 PM
RE: Wallis' product exploration - Allen - 02-09-2020, 03:08 PM
RE: Wallis' product exploration - pinkman - 02-09-2020, 02:14 PM
RE: Wallis' product exploration - Gerson W. Barbosa - 02-11-2020 12:53 AM
RE: Wallis' product exploration - EdS2 - 02-10-2020, 10:35 AM
RE: Wallis' product exploration - pinkman - 02-11-2020, 10:02 AM
RE: Wallis' product exploration - pinkman - 02-12-2020, 10:01 PM



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