Post Reply 
Monte-Carlo Pi
01-13-2022, 06:14 PM
Post: #13
RE: Monte-Carlo Pi
(01-13-2022 01:04 AM)ttw Wrote:  The use of multiplies 113 (and some other numbers) comes from the theory of continued fractions. Any number X may be approximated by a fraction P/Q (possibly improper). Trivially the error e=|X-P/Q| is less than 1/2Q. For each X, there exists a sequence of Qs with an error of less than 1/2Q^2. The sequence for Pi is 7, 106, 113, 33102, 33215,...

If one takes samples of size 33000, one gets at best errors of size 1/33000; with size 33215, there may be some errors of size 1/1103236225. Some samples are extraordinarily good.

Of course, in "real -ife" computation, one wouldn't know what Q to use.

Thank you for this explanation, I will now have to deepen this somewhat and perfect my modest knowledge on this subject ...

In the meantime, I have found a way to shorten VERSION#2 while making it even faster.
But I won't say anything about it here, I hope that other HP-15C enthusiasts have already found how to do it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Monte-Carlo Pi - Ángel Martin - 01-11-2022, 11:37 AM
RE: Monte-Carlo Pi - Albert Chan - 01-11-2022, 12:19 PM
RE: Monte-Carlo Pi - Andres - 01-11-2022, 12:51 PM
RE: Monte-Carlo Pi - J-F Garnier - 01-11-2022, 01:11 PM
RE: Monte-Carlo Pi - Gerson W. Barbosa - 01-19-2022, 09:07 PM
RE: Monte-Carlo Pi - Ángel Martin - 01-29-2022, 10:37 AM
RE: Monte-Carlo Pi - Gerson W. Barbosa - 01-29-2022, 02:58 PM
RE: Monte-Carlo Pi - KeithB - 01-11-2022, 02:12 PM
RE: Monte-Carlo Pi - ttw - 01-12-2022, 10:18 AM
RE: Monte-Carlo Pi - Dave Shaffer - 01-13-2022, 03:30 AM
RE: Monte-Carlo Pi - Csaba Tizedes - 01-11-2022, 05:40 PM
RE: Monte-Carlo Pi - C.Ret - 01-12-2022, 05:33 PM
RE: Monte-Carlo Pi - Ángel Martin - 01-12-2022, 01:50 PM
RE: Monte-Carlo Pi - ttw - 01-13-2022, 01:04 AM
RE: Monte-Carlo Pi - C.Ret - 01-13-2022 06:14 PM
RE: Monte-Carlo Pi - KeithB - 01-13-2022, 01:58 PM
RE: Monte-Carlo Pi - Gerson W. Barbosa - 01-13-2022, 10:10 PM
RE: Monte-Carlo Pi - Ángel Martin - 01-14-2022, 09:03 AM
RE: Monte-Carlo Pi - C.Ret - 01-14-2022, 05:53 PM
RE: Monte-Carlo Pi - Gerson W. Barbosa - 01-14-2022, 08:31 PM
RE: Monte-Carlo Pi - Joe Horn - 01-15-2022, 05:52 AM



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