HP 25 Fibonacci sequence in one program step

10162021, 02:55 PM
(This post was last modified: 10162021 03:00 PM by Gerson W. Barbosa.)
Post: #24




RE: HP 25 Fibonacci sequence in one program step
(10132021 08:34 PM)rprosperi Wrote: Many other models support recall arithmetic (45, 27, 15C, 32S, 32SII, others?) but only the 42S includes recall arithmetic AND stack register access. Since we’re at it, I decided to write an HP42S program to display the Fibonacci sequence trying to use the least number of steps (Not sure whether I’ve succeeded or not – another one I tried has exactly the same number of steps and bytes). Interestingly an equivalent HP15C program, which lacks recall stack arithmetic but does have recall arithmetic, is possible using the same number of steps (8). Code:
XEQ “Fib” → 0 R/S → 1 R/S → 1 R/S → 2 R/S → 3 R/S → 5 R/S → 8 … 

« Next Oldest  Next Newest »

User(s) browsing this thread: