Post Reply 
Yet another Fibonacci mini-challenge (HP-42S/Free42)
12-05-2018, 03:12 AM (This post was last modified: 12-05-2018 03:15 AM by Gerson W. Barbosa.)
Post: #4
RE: Yet another Fibonacci mini-challenge (HP-42S/Free42)
(12-05-2018 02:07 AM)Didier Lachieze Wrote:  Seven steps, not including LBL and END:

Code:
00 { 19-Byte Prgm }
01▸LBL "FIB"
02 1
03 0
04 LBL 00
05 X<>Y
06 STO+ ST Y
07 DSE ST Z
08 GTO 00
09 END

It works also on the HP-41.

6 steps, 42S-only:

Code:

00 { 18-Byte Prgm }
01▸LBL "FIB"
02 1
03 LN
04▸LBL 00
05 RCL+ ST L
06 DSE ST Y
07 GTO 00
08 END

Apparently slightly faster, but not fast enough (at least on the real 42S).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Yet another Fibonacci mini-challenge (HP-42S/Free42) - Gerson W. Barbosa - 12-05-2018 03:12 AM



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