Post Reply 
Programming Exercise (HP-15C, 15C LE - and others)
03-25-2014, 11:45 PM (This post was last modified: 03-26-2014 02:47 AM by Gerson W. Barbosa.)
Post: #33
RE: Programming Exercise (HP-15C, 15C LE - and others)
(03-25-2014 09:27 PM)Thomas Klemm Wrote:  
(03-25-2014 03:50 PM)Gerson W. Barbosa Wrote:  0.6930971830, 32 min 9 sec.
Is that faster than combining the two terms: \(\frac{1}{n}-\frac{1}{n+1}=\frac{1}{n(n+1)}\) ?
I don't think so. I haven't tested it on the HP-41C, but this is faster on the WP 34S. BTW, shouldn't it be \[\frac{1}{n-1}-\frac{1}{n}=\frac{1}{n^{2}-n}\]?

I just prefer the left side of the expression because it preserves the original terms:

\[1-\frac{1}{2}+\frac{1}{3}-\frac{1}{4}+ \cdots +\frac{1}{9999}-\frac{1}{10000}\]

If n = 4, for instance, then

\[\frac{1}{3}-\frac{1}{4}\neq \frac{1}{12}\]

on a 10-digit calculator ( 3 1/x 4 1/x 12 1/x - --> -3e-11 ).

Cheers,

Gerson.


--------------

P.S.:

HP-41C

Code:

01 LBL'S
02 4
03 10^X
04  0
05 LBL 00
06 RCL Y
07 DSE Z
08 RCL Z
09 *
10 1/X
11 +
12 DSE Y
13 GTO 00
14 END

0.6930971831 (28 min 28 sec)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming Exercise (HP-15C, 15C LE - and others) - Gerson W. Barbosa - 03-25-2014 11:45 PM



User(s) browsing this thread: 3 Guest(s)