The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(35S) spigot algorithm for the digits of PI
05-30-2015, 05:03 PM (This post was last modified: 06-15-2017 01:20 PM by Gene.)
Post: #1
(35S) spigot algorithm for the digits of PI
Program:
Code:
P001 LBL P      P018 FS? 0      P035 INT÷
P002 STO N      P019 GTO P022   P036 DSE J
P003 4          P020 RCL(J)     P037 GTO P017
P004 INT÷       P021 GTO P023   P038 ENTER
P005 STO I      P022 2E3        P039 CF 0
P006 CLx        P023 RCL× F     P040 RCL F
P007 STO D      P024 +          P041 INT÷
P008 STO E      P025 1          P042 RCL+ E
P009 1E4        P026 RCL J      P043 STO P
P010 STO F      P027 ENTER      P044 VIEW P
P011 SF 0       P028 +          P045 x<>y
P012 14         P029 x<>y       P046 RCL F
P013 RCL× I     P030 −          P047 RMDR
P014 STO J      P031 RMDR       P048 STO D
P015 DSE J      P032 STO(J)     P049 STO E
P016 RCL D      P033 x<>y       P050 DSE I
P017 RCL× J     P034 LASTx      P051 GTO P012

Usage:
Calculate the first 40 digits of \(\pi\): 3.141592653589793238462643383279502884197

40 XEQ P001

For the next digits to appear just keep hitting the [R/S] button:
Code:
P=
      3141
      5926
      5358
      9793
      2384
      6264
      3383
      2795
       288     <<< mind the missing 0
      4197

This is a translation of the C-program from:
Pi Unleashed.
Jörg Arndt, Christoph Hänel

Rediscovered in: A Sigma Function in the 35s Solver!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(35S) spigot algorithm for the digits of PI - Thomas Klemm - 05-30-2015 05:03 PM



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