Re: A Sigma Function in the 35s Solver! Message #3 Posted by Katie Wasserman on 13 Aug 2007, 10:45 a.m., in response to message #2 by Don Shepherd
The 17BII and 17BII+ have a Sigma function in the solver that forces it to specifically iterate over a defined interval (see below for more). There is no such function in the 35s. Solver iteration in the 35s is determined by the internals of how the solver works and is generally not controllable. On the other hand, you can trick the solver into running for a really long time by giving it an equation that it can't solve yet slowly converges, something like: INV(A) = INV(A).
However, the 35s does have a STO function that seems identical to the L() function in the 17BII and 17BII+, this allows for incrementing a variable: e.g., I+1 STO I. Using these two pieces we can get the solver to run while for an incredibly long time while incrementing a variable. If you tell it to solve: INV(A) = INV(A)+ 0x(I+1 STO I), solve for A and give it a starting value of I=0 and A=1, it will run for about 2400 iterations on the 35s. after that point the solver will end up solving the equation by coming up with A ~= 1E499. 2400 is pretty much all the iterations you'd ever want to do on this calculator  it ain't that fast  I'll call it a nearinfinite number of iterations for our purpose.
Here's how the rest of it works ... if 'I' is not the target of the solver, then the solver will prompt for the starting value. That leaves just the ending value and the need to use this ending value as a way to halt the solver's nearinfinite loop. In the equation I wrote above this is done by, 1IDIV(I,N). This will have a value of 1 when 'I' is less than N and of 0 when I becomes N (and until 'I' becomes 2N). Using this on both sides of the "=' the equation becomes 0 = 0 when 'I' becomes N, thus achieving the stopping condition for the solver.
The other element in the equation is: I STO (I). This is just to demonstrate that the controlled loop can do something useful: fill addressable memory with incremental values. You could just have well specified: 0x(I+1 > I + RAND > (I)) to fill memory (from the initial value of I to N) with random numbers.
This is all pretty nonobvious stuff and I've just begun to experiment with it, but it's amazing what just the STO function in the solver opens up. You won't find anything about this in the manual (or anywhere else as fas as I know).
I don't have a 17BII+ but on the 17BII you can do the same thing in the solver: INV(A)=INV(A)+0xL(I:I+1). Start with I=0 and A=1, solver for A and RCL I when it finishes and you'll find that I has a value of about 2400, showing that this many iterations have been done. Unfortunately you can't 'STO (I)' on the 17BII because it has no way to write to an array (although you can read the items in a list from within the solver). Of course you would never really do this on the 17BII you'd use: X=Sigma(I:1:N:1,whatever you want to do). Note that 'Sigma' is the summation sign and 'whatever you want to do' will be evaluated N times and the results will be summed and returned in X.
Edited: 13 Aug 2007, 11:23 a.m.
