Programming exercise (RPL/RPN) - Reciprocal Fibonacci Constant
|
02-17-2017, 01:58 PM
Post: #11
|
|||
|
|||
RE: Programming exercise (RPL/RPN) - Reciprocal Fibonacci Constant
Here are mine, all stack-only of course, mainly because these run faster. However, numbered registers and local variable versions might be better if lower byte count is the only goal. Perhaps we can divide the solutions into two groups. So far for the HP-42S we have a few stack-only 27-byte solutions and one 25-byte solution, the latter using one number register.
Congratulations to all! Gerson. HP-50g (50 bytes) « 0. 1. DUP2 5. ROLL START SWAP OVER + ROT OVER INV + UNROT NEXT DROP2 » HP-48G (52.5 bytes) « 0 1 DUP2 ROT 5 ROLL START OVER + ROT OVER INV + SWAP ROT NEXT DROP2 » HP-42S 00 { 28-Byte Prgm } 01>LBL "RFC" 02 0 03 0 04 1 05>LBL 00 06 + 07 LASTX 08 1/X 09 STO+ ST Z 10 X<> ST L 11 X<>Y 12 DSE ST T 13 GTO 00 14 RCL ST Z 15 .END. HP-41 01>LBL 'RFC 02 0 03 0 04 1 05>LBL 00 06 + 07 LASTX 08 1/X 09 STO+ Z 10 X<> L 11 X<>Y 12 DSE T 13 GTO 00 14 RCL Z 15 .END. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)