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: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}\]?(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 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:
0.6930971831 (28 min 28 sec) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)