Post Reply 
Wallis' product exploration
02-08-2020, 02:13 AM
Post: #2
RE: Wallis' product exploration
You can check the result with a direct formula, for n terms, here

Or, using lgamma(), we have

\(\log \left(2 \prod _{k=1} ^{k=n} {4k^2 \over 4k^2-1}\right) =
4\log(\Gamma(n)) - 2\log(\Gamma(2n)) + n \log(16) + 2 \log(n) - \log(4n+2) \)

Example, using log1p and sum the logarithm of the terms backwards, this matched above formula

lua> require'mathx'
lua> log1p = mathx.log1p
lua> s=0; for i=100e6, 1, -1 do s = s - log1p(-1/(4*i*i)) end
lua> = 2*math.exp(s)
3.1415926457358117
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 - Albert Chan - 02-08-2020 02:13 AM
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 - 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: 5 Guest(s)