Post Reply 
Programming Exercise (HP-15C, 15C LE - and others)
03-22-2014, 03:02 AM
Post: #14
RE: Programming Exercise (HP-15C, 15C LE - and others)
(03-22-2014 12:59 AM)Shawn Gibson Wrote:  You guys are amazing! Now I have to go through your code to see how you did it.
Best Regards
Shawn

Well, mine was just a slight modification of Thomas Klemm's program. But we can easily break the 20-second barrier on the WP 34S:

Code:

001 LBL A
002 0
003 #001
004 +/- 
005 RCL/ Z
006 STO+ Y
007 x<> L
008 DSE Z
009 BACK 005
010 x<> Y
011 END

Unlike Thomas Klemm's original program, N has to be even otherwise the sign of the result will be inverted.

10000 A --> 0.6930971830599453 (16.9 seconds, but I guess the limit hasn't been reached yet -- the WP 34S has a rich instruction set)

Back to HP-only calculators, here is the HP-42S version, but it should take about 18 minutes to run:

Code:

00 { 27-Byte Prgm }
01>LBL "S"
02 1E4
03 0
04 1
05>LBL 00
06 +/-
07 RCLĂ· ST Z
08 STO+ ST Y
09 Rv
10 LASTX
11 DSE ST Z
12 GTO 00
13 X<>Y
14 .END.

Best regards,

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-22-2014 03:02 AM



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