Programming exercise (RPL/RPN)  Reciprocal Fibonacci Constant

02172017, 01:58 PM
Post: #11




RE: Programming exercise (RPL/RPN)  Reciprocal Fibonacci Constant
Here are mine, all stackonly 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 HP42S we have a few stackonly 27byte solutions and one 25byte solution, the latter using one number register.
Congratulations to all! Gerson. HP50g (50 bytes) « 0. 1. DUP2 5. ROLL START SWAP OVER + ROT OVER INV + UNROT NEXT DROP2 » HP48G (52.5 bytes) « 0 1 DUP2 ROT 5 ROLL START OVER + ROT OVER INV + SWAP ROT NEXT DROP2 » HP42S 00 { 28Byte 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. HP41 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)