HP Forums
(11C) Summation of infinite, alternating series - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (11C) Summation of infinite, alternating series (/thread-918.html)



(11C) Summation of infinite, alternating series - Thomas Klemm - 03-16-2014 05:16 AM

Code:
001 - 42,21,11  LBL A         029 - 43, 4, 0  SF 0          057 - 44,30,24  STO- (i)      
002 - 43, 5, 0  CF 0          030 -    43 35  CLx           058 -    45 .1  RCL .1        
003 -    44 .1  STO .1        031 -    44 25  STO I         059 -    45 25  RCL I         
004 -       34  x<>y          032 - 42,21, 2  LBL 2         060 -    42 30  x!=y          
005 -    44 .0  STO .0        033 -    45  8  RCL 8         061 -    22  0  GTO 0         
006 -        1  1             034 -    32 12  GSB B         062 -    45 .2  RCL .2        
007 -    44  8  STO 8         035 -    44 24  STO (i)       063 -    44 25  STO I         
008 -        0  0             036 -    42  6  ISG           064 -    43 40  x=0           
009 -    44  9  STO 9         037 - 42, 7, 4  FIX 4         065 -    22  4  GTO 4         
010 -    44 25  STO I         038 -        1  1             066 -        1  1             
011 - 42,21, 1  LBL 1         039 - 44,40, 8  STO+ 8        067 -    22  6  GTO 6         
012 -    32 12  GSB B         040 -    45 .1  RCL .1        068 - 42,21, 4  LBL 4         
013 -    45  8  RCL 8         041 -    45 25  RCL I         069 -    45 24  RCL (i)       
014 - 44,30, 8  STO- 8        042 -    42 10  x<=y          070 -    45  8  RCL 8         
015 - 44,30, 8  STO- 8        043 -    22  2  GTO 2         071 -       10  /             
016 -       20  x             044 -        2  2             072 - 44,40, 9  STO+ 9        
017 - 44,40, 9  STO+ 9        045 - 43, 6, 0  F? 0          073 -        2  2             
018 -    42  6  ISG           046 -       16  CHS           074 -       16  CHS           
019 - 42, 7, 4  FIX 4         047 -    44  8  STO 8         075 - 44,20, 8  STOx 8        
020 -    45 .0  RCL .0        048 -    43 16  ABS           076 -    42  6  ISG           
021 -    45 25  RCL I         049 - 42,21, 6  LBL 6         077 - 42, 7, 4  FIX 4         
022 -    42 10  x<=y          050 -       30  -             078 -    45 .1  RCL .1        
023 -    22  1  GTO 1         051 -    44 25  STO I         079 -    45 25  RCL I         
024 -    44  8  STO 8         052 -    44 .2  STO .2        080 -    42 10  x<=y          
025 -        2  2             053 - 42,21, 0  LBL 0         081 -    22  4  GTO 4         
026 -       10  /             054 -    45 24  RCL (i)       082 -    45  9  RCL 9         
027 -    42 44  FRAC          055 -    42  6  ISG           083 -    43 32  RTN           
028 -    43 30  x!=0          056 - 42, 7, 4  FIX 4         084 - 42,21,12  LBL B

Example:
Find the sum of S = 1 -1/2 + 1/3 - 1/4 + 1/5 - ...
  • we define the i-th term = 1/(1+i):
    GTO B, P/R, 1, +, 1/x, RTN, P/R
  • we'll use PSum = 10, NDif = 7 for maximum accuracy:
    10, ENTER, 7, A
  • after just one minute, we get the sum = 0.693147182 in the display. The
    theoretically correct value is Ln(2) = 0.693147181, so we've got 9 decimals accuracy.