Post Reply 
I was bored and found a HP-27S
06-11-2014, 02:00 AM (This post was last modified: 06-11-2014 02:03 AM by Katie Wasserman.)
Post: #20
RE: I was bored and found a HP-27S
(06-10-2014 08:46 PM)Dave Britten Wrote:  Nice! I hadn't spotted that one yet while browsing the DVD index. I'll have to try some of it on my 200LX.

If you want to play with the solver on the 200LX, you can make use of the huge amount of memory for reading/writing using the 1-2-3 linking functions STOCELL and RCLCELL. Here's a gigantic equation I wrote some time ago doing that to solve for pi to a large number of decimal places (I forget what the limit is but many thousands). To use it just open 1-2-3 name a range call OUT and run this function in the solver, enter n -- the number of decimal places you want and hit CALC_PI.


Code:


{!calculate Pi to n places into OUT in 1-2-3!

calc_pi=

l(n,10000000000)*0+ !set the number of digits/cell!

sigma(x,1,length(out),1, !zero the output range! stocell(0,out,x,1)+stocell(0,out,x,2) ) +

stocell(.28*g(n),out,1,1) + !initial value for 1st term!

SIGMA(x,length(out),1+l(c,0),-1, !add to result! STOCELL(l(t,g(c)+RCLCELL(out,x,1)+RCLCELL(out,x,2))- l(c,idiv( g(t),g(n)))*g(n),out,x,2)) +

sigma(i,2,2*log(g(n))*length(out)/log(50),2, !set up 1st term loop!

SIGMA(x,l(c,0)+LENGTH(out),1, -1, !multiply by i! STOCELL(mod((g(c)+i*RCLCELL(out,x,1)),g(n))+ 0*l(c,idiv((g(c)+i*RCLCELL(out,x,1)),g(n))), out,x,1)) +

SIGMA(x,1+l(c,0),LENGTH(out),1, !divide by 50*(i+1)! STOCELL(idiv((g(c)*g(n)+RCLCELL(out,x,1)),(i+1)*50) + 0*l(c,mod((g(c)*g(n)+RCLCELL(out,x,1)), (i+1)*50)),out,x,1)) +

SIGMA(x,Length(out),1+l(c,0),-1, !add to result! STOCELL(l(t,g(c)+RCLCELL(out, x,1)+RCLCELL(out,x,2)) - l(c,idiv(g(t),g(n)))*g(n) ,out, x,2))) +

stocell(.030336*g(n),out,1,1) + !initial value for 2nd term!

SIGMA(x,length(out),1+l(c,0),-1, !add to result! STOCELL(l(t,g(c)+RCLCELL(out,x,1)+RCLCELL(out,x,2))- l(c,idiv( g(t),g(n)) ) * g( n) ,out,x,2)) +

SIGMA(i,2,2*log(g(n))*length(out)/log(6250/9),2, !setup 2nd term loop!

SIGMA(x,l(c,0)+LENGTH(out),1, -1, !multiply by i*9! STOCELL(mod((g(c)+i*9*RCLCELL(out,x,1)),g(n)) + 0*l( c, idiv((g(c)+i*9*RCLCELL(out,x,1)), g(n))),out,x,1)) +

SIGMA(x,1+l(c,0),LENGTH(out),1, !divide by 50*(i+1)! STOCELL(idiv((g(c)*g(n)+RCLCELL(out,x,1)),(i+1)*50) + 0*l(c,mod((g(c)*g(n)+RCLCELL(out,x,1)), (i+1)*50)),out,x,1)) +

SIGMA(x,1+l(c,0),LENGTH(out),1, !divide by 125! STOCELL(idiv((g(c)*g(n)+RCLCELL(out,x,1)),125) + 0*l( c,mod((g(c)*g(n)+RCLCELL(out,x,1)),125)), out, x,1)) +

SIGMA(x,LENGTH(out),1+l(c,0),-1, !add to result! STOCELL(l(t,g(c)+RCLCELL(out,x,1)+RCLCELL(out,x,2))- l(c,idiv( g(t),g(n)) ) * g( n) ,out,x,2)) ) }

Edit: Gee that code block looks terrible on this forum. Here it is on the old forum.

-katie

Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
I was bored and found a HP-27S - jebem - 06-09-2014, 10:38 PM
RE: I was bored and found a HP-27S - jebem - 06-10-2014, 09:35 AM
RE: I was bored and found a HP-27S - Katie Wasserman - 06-11-2014 02:00 AM
RE: I was bored and found a HP-27S - jebem - 06-25-2014, 06:49 PM
RE: I was bored and found a HP-27S - jebem - 06-26-2014, 01:44 PM
RE: I was bored and found a HP-27S - jebem - 06-26-2014, 01:40 PM
RE: I was bored and found a HP-27S - jebem - 06-26-2014, 03:57 PM
RE: I was bored and found a HP-27S - jebem - 06-27-2014, 01:15 PM
RE: I was bored and found a HP-27S - jebem - 06-27-2014, 08:50 PM
RE: I was bored and found a HP-27S - HP67 - 06-27-2014, 02:56 PM
RE: I was bored and found a HP-27S - HP67 - 06-27-2014, 03:28 PM
RE: I was bored and found a HP-27S - jebem - 06-27-2014, 10:18 PM
RE: I was bored and found a HP-27S - jebem - 06-27-2014, 10:58 PM
RE: I was bored and found a HP-27S - jebem - 06-28-2014, 08:02 AM
RE: I was bored and found a HP-27S - jebem - 06-27-2014, 10:46 PM
RE: I was bored and found a HP-27S - jebem - 06-28-2014, 07:55 AM
RE: I was bored and found a HP-27S - jebem - 06-27-2014, 10:56 PM
RE: I was bored and found a HP-27S - jebem - 06-27-2014, 11:05 PM
RE: I was bored and found a HP-27S - jebem - 06-28-2014, 04:44 PM
RE: I was bored and found a HP-27S - jebem - 06-28-2014, 05:37 PM
HP-27S that does not turn on - franz.b - 11-06-2020, 08:24 PM
RE: I was bored and found a HP-27S - jebem - 11-09-2020, 07:14 AM



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