Yet another Fibonacci mini-challenge (HP-42S/Free42)
|
12-05-2018, 12:59 AM
Post: #1
|
|||
|
|||
Yet another Fibonacci mini-challenge (HP-42S/Free42)
00 { 22-Byte Prgm }
01▸LBL "FIB" 02 03 04 05 06 07 08 09 10 11 END 11 XEQ FIB —> 89 50 XEQ FIB —> 12586269025 Write an HP-42S program that computes the nth Fibonacci number ( 0 < n < 51 ) using nine steps or less, not including LBL and END. Of course, for this mini-challenge byte-count is less relevant than number of steps. My particular application requires n in the range from 1 to 20 at most, so the above routine is ok for me. However, programs that work for n = 0 up to the largest possible argument on both the HP-42S and Free42 are welcome as well, no matter if longer than nine or even nineteen steps. Have fun! |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)