The Museum of HP Calculators

HP Forum Archive 18

[ Return to Index | Top of Index ]

50G summation function.
Message #1 Posted by Hal Bitton in Boise on 28 Dec 2007, 11:53 a.m.

Hello all,
Am having trouble getting the summation (epsilon)function to work directly from the stack with keyed in parameters. Consider the summation: E(epsilon)x=1, to x=100, 1/x. When I build this expression in the equation writer environment, put it onto the stack, and evaluate it, it works fine. If I decompose this expression (using the obj> function) such that the low limit (1) is in level 3, the upper limit (100) is in level 2, and the function (1/x) is in level 1, and then invoke E (right shift SIN key) the summation evaluates fine as well. Logic would suggest that this is the correct construct for using the epsilon key with the summation parameters in the stack. However, when I key these exact parameters into stack registers 3,2,and 1 and hit epsilon, I get a "bad argument type" error. The docs seem to shed no light on things, so I am asking for help from the forum members on this one.
Thanks, and best regards, Hal

      
Re: 50G summation function.
Message #2 Posted by Walter B on 28 Dec 2007, 12:09 p.m.,
in response to message #1 by Hal Bitton in Boise

FWIW, your "epsilon" is a capital sigma. This won't solve your summation, but help you to be understood.

      
Re: 50G summation function.
Message #3 Posted by Chuck on 28 Dec 2007, 12:12 p.m.,
in response to message #1 by Hal Bitton in Boise

I hate to be the picky one, but the symbol and operation are Sigma, not epsilon (oops Walter beat me to it). It looks as though you need the variable 'x' in level four before pressing Sigma.

Edited: 28 Dec 2007, 12:12 p.m.

      
Re: 50G summation function.
Message #4 Posted by George Bailey (Bedford Falls) on 28 Dec 2007, 12:38 p.m.,
in response to message #1 by Hal Bitton in Boise

As the Advanced User's Reference Manual says about the Sigma/Summation function:

Stack

level 4: index

level 3: x(init)

level 2: x(final)

level 1: summand

When I use obj-> on a summation previously composed in the equation writer, I end up with all these four parts on the stack, with the index ('x') on level 6, the summand on level 3, the number 4. on level 2 and the Sigma on level 1.

            
Re: 50G summation function.
Message #5 Posted by Norris on 28 Dec 2007, 7:15 p.m.,
in response to message #4 by George Bailey (Bedford Falls)

The Summation function takes four inputs, as described above. You need to add the index ('X') in level 4.

You can also see this by creating the expression in the Equation Writer, then turning off "Textbook" in MODE DISP. Then the expression comes out on a single line as:

'E(X=1,100,1/X)'

where E = capital sigma. So to do the Summation from the stack, you enter the four inputs in that order ('X', 1, 100, '1/X'), then hit E.

If you decompose the expression with OBJ->, you should get 6 levels of stuff: E on level 1; the number 4. on level 2; and the four inputs on levels 3 to 6. The number on level 2 signifies the number of components, which is sometimes returned by OBJ->.

If you drop the stuff on levels 1 and 2, you can evaluate the expression with E. Or just drop level 2, leaving the E on level 1, and hit EVAL.

Edited: 28 Dec 2007, 7:16 p.m.

                  
Re: 50G summation function.
Message #6 Posted by Hal Bitton in Boise on 28 Dec 2007, 7:34 p.m.,
in response to message #5 by Norris

Thanks very much everybody...
Pardon my bad Greek, and pardon me for overlooking what was in level 6 after the decomposition.
Best regards, Hal


[ Return to Index | Top of Index ]

Go back to the main exhibit hall