Post Reply 
Programming Exercise (HP-15C, 15C LE - and others)
03-29-2014, 02:21 AM (This post was last modified: 03-29-2014 02:46 AM by Gerson W. Barbosa.)
Post: #49
RE: Programming Exercise (HP-15C, 15C LE - and others)
(03-29-2014 12:36 AM)Tugdual Wrote:  Nobody mentioned that entering $$\sum _{ K=1 }^{ 10000 }{ \frac { { (-1 })^{ K+1 } }{ K } }$$ on the Prime with no need for any sort of coding would instantly return 0.693097183025
Is that off scope consideration for this thread?
I know that the prime is blazing fast but the speed is so impressive that I wonder if the calculator is actually performing a loop?

It does do the summation, term by term (unless acceleration techniques I am not aware of are being used - anyway 10000 terms are too few, given the Prime clock speed) . Too bad the last two digits are wrong, though. This is the CAS, I presume, but the Prime has a more exact mode, I think.

This approximation is exact to 20 digits. The HP-71B evaluates it in 0.17 seconds:

Code:

1 T=TIME @ N=10000 @ K=2*N+1 @ S=LOG(2)-1/(K+1/K) @ DISP S;TIME-T

.69309718306 .17


For the HP-71B, that's instantly :-)

Gerson.
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-29-2014 02:21 AM



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