The Sigma Function on the WP34  Printable Version + HP Forums (https://archived.hpcalc.org/museumforum) + Forum: HP Museum Forums (https://archived.hpcalc.org/museumforum/forum1.html) + Forum: Old HP Forum Archives (https://archived.hpcalc.org/museumforum/forum2.html) + Thread: The Sigma Function on the WP34 (/thread182986.html) 
The Sigma Function on the WP34  Eddie W. Shore  04252011
How is the Sigma function used? Re: The Sigma Function on the WP34  Paul Dale  04252011 The source for sum is in the subversion repository.
The finish value defaults to 0 and the increment/decrement defaults to 1.
Re: The Sigma Function on the WP34  Paul Dale  04252011 Small correction. You need to start the sum from 11 and subtract 1 at the start of the function. The sum stops before the zero term is evaluated. Thus,
LBL A Then 11 g Sigma A gives 0.3998046875
Re: The Sigma Function on the WP34  Dieter  04252011 Quote:Not just him. ;) That's one of the things that made me read the manual twice before I finally realized that the sum and product loops are working backwards. Pauli, I think this is a quite unintuitive feature. I'm a big fan of POLA user interfaces (policy of least astonishment  things should work the way the average user expects). That's why I think the sum and product functions should count upwards. Simply think of the way you write down a sum: it's from 1 to n, not from n down to 1. And this way there is also no problem with an index starting at zero. ;)
Dieter
Re: The Sigma Function on the WP34  Paul Dale  04252011 Originally I had both product and sum counting up then the documentation had them counting down so I switched. There are arguments both ways on this:
The change to make the count go the other way is trivial  the DSE becomes an ISG in the main loop. I guess we could implement alternate commands to count the other way or switch to counting up again. I'm indecisive on this one, like I said advantages both ways.  Pauli
Edited: 25 Apr 2011, 9:41 p.m.
Re: The Sigma Function on the WP34  exschr  04262011 how about a flag to decide (switch) if counting up or down is used? (but I bet you are tight on flag usage though) Anyway, very nice work done, I'm looking forward to buy a 30b and starting to flash the business out of it ;)
Thanks a lot for more fun!
Re: The Sigma Function on the WP34  Paul Dale  04262011 We wouldn't use a flag for this, we'd define two commands for each.
 Pauli
Re: The Sigma Function on the WP34  Namir  04262011 How about using the sign of the summation range as a way to tell if you are summing up or down. Let's say a negative value means you are counting down, and vice versa?
Namir
