Post Reply 
2023 RPN HHC Programming Contest
10-09-2023, 03:10 AM
Post: #38
RE: 2023 RPN HHC Programming Contest
(10-09-2023 12:10 AM)Allen Wrote:  Preliminary 18-byte program (12 steps with label and end) Note: Byte count is in Free42 and may differ slightly in the plain 41C.

Code:

00 { 18-Byte Prgm }
01>LBL "HHC"
02 PI
03 IP
04 ATAN
05 IP
06 RCL ST X
07 LASTX
08 FP
09 ATAN
10 -
11 IP
12 .END.

Yes, on the HP-41 the number of bytes is 21. So 10 instructions and 11 bytes not considering LBL and END. All one-byte instructions except for the necessary RCL ST X. Anyway, it’s difficult to do it in 12 steps using this approach (an approximation for 41 or 71, the other obtained through the 30 units difference). Congratulations for managing to save two steps in your previous code!

Gerson.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
2023 RPN HHC Programming Contest - Gene - 10-07-2023, 01:00 PM
RE: 2023 RPN HHC Programming Contest - Gerson W. Barbosa - 10-09-2023 03:10 AM



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