Post Reply 
Yet another Fibonacci mini-challenge (HP-42S/Free42)
12-05-2018, 04:14 PM
Post: #7
RE: Yet another Fibonacci mini-challenge (HP-42S/Free42)
(12-05-2018 03:15 AM)Thomas Klemm Wrote:  The Obvious

Code:
00 { 28-Byte Prgm }
01 LBL "FIB"
02 5
03 SQRT
04 1
05 +
06 2
07 ÷
08 X<>Y
09 Y↑X
10 5
11 SQRT
12 ÷
13 0.5
14 +
15 IP
16 END

14 steps... if you notice that asinh(1/2) = ln(phi) then you can easily do it in ten steps. Of course some loss of accuracy is expected, but it will work for n = 0 up to n = 50. That can be slightly modified to fit in 9 steps if Fib(0) is not required.

(12-05-2018 03:15 AM)Thomas Klemm Wrote:  Thanks for the challenge. That was fun!

Hopefully I haven't spoiled the fun :-)

Gerson.
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 04:14 PM



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