The Museum of HP Calculators
This program is by Eddie W. Shore and is used here by permission.
This program is supplied without representation or warranty of any kind. Eddie W. Shore and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.
Σ f(X) = S
The sum is stored in the variable S.
To find the sum, enter A then B on the stack and execute the appropriate label (I have it under label W).
A B XEQ W ENTER
To change or load the function, hit GTO W017. This line is where the function is stored (as an equation). X must be the dependent variable of the function. This program is made to run in RPN Mode.
Σ 1/X = S
Load the function:
RS PRGM (enter program mode)
(left or right arrow to edit the equation)
If necessary, clear the equation and type 1 ÷ RCL X or INV RCL X, then press ENTER
RS PRGM (leave program mode)
Calculate the sum:
1 ENTER 10 XEQ W ENTER (or XEQ W001 ENTER)
S = 2.928968 (FIX 6)
W001 LBL W W002 1E3 % initialization W003 ÷ W004 + W005 STO I % I acts as a counter, W006 0 % use f(X) where X=INT(I) W007 STO S W008 RCL I % loop starts here W009 INTG W010 STO X W011 XEQ W017 W012 STO+ S W013 ISG I W014 GTO W008 % end of loop W015 VIEW S W016 RTN W017 f(X) ← enter your function here W018 RTN