Happy Pi Day!
|
12-12-2021, 06:44 PM
Post: #10
|
|||
|
|||
RE: Happy Pi Day!
Gerson, below is part of a python spigot algo my son uses to calculate PI. The range 10,000,000 would need to be reduced a lot for the HP48G. Any thoughts on the best way to program this up in RPL?
q, r, t, k, m, x = 1, 0, 1, 1, 3, 3 for j in range(10,000,000): if 4 * q + r - t < m * t: yield m q, r, t, k, m, x = 10*q, 10*(r-m*t), t, k, (10*(3*q+r))//t - 10*m, x else: q, r, t, k, m, x = q*k, (2*q+r)*x, t*x, k+1, (q*(7*k+2)+r*x)//(t*x), x+2 HP48GX, HP42s and DM42. |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Happy Pi Day! - Gerson W. Barbosa - 03-14-2020, 02:08 AM
RE: Happy Pi Day! - pinkman - 03-14-2020, 06:19 AM
RE: Happy Pi Day! - Gerson W. Barbosa - 03-14-2020, 02:53 PM
RE: Happy Pi Day! - rprosperi - 03-14-2020, 05:04 PM
RE: Happy Pi Day! - Jim Horn - 03-14-2020, 05:15 PM
RE: Happy Pi Day! - Gerson W. Barbosa - 03-14-2020, 12:17 PM
RE: Happy Pi Day! - Dave Britten - 03-14-2020, 12:47 PM
RE: Happy Pi Day! - BruceH - 03-15-2020, 11:32 AM
RE: Happy Pi Day! - Eddie W. Shore - 03-15-2020, 07:29 PM
RE: Happy Pi Day! - DM48 - 12-12-2021 06:44 PM
RE: Happy Pi Day! - Albert Chan - 12-12-2021, 11:04 PM
RE: Happy Pi Day! - Gerson W. Barbosa - 12-13-2021, 12:41 AM
RE: Happy Pi Day! - DM48 - 12-13-2021, 01:54 AM
RE: Happy Pi Day! - Gil - 12-13-2021, 01:21 AM
RE: Happy Pi Day! - Gerson W. Barbosa - 12-13-2021, 03:57 AM
|
User(s) browsing this thread: 1 Guest(s)