HP 25 Fibonacci sequence in one program step
10-14-2021, 10:03 AM (This post was last modified: 10-14-2021 10:05 AM by C.Ret.)
Post: #21
 C.Ret Member Posts: 263 Joined: Dec 2013
RE: HP 25 Fibonacci sequence in one program step
(10-13-2021 04:42 PM)Gerson W. Barbosa Wrote:  RPN: Y, Z, T <- k1; X <-k2 Then * * * …
RPL: Fill the infinite stack with [ [ 1 1 ] [ 1 0 ] ] Then * * * …

and

Thank to remind me this old matrix arithmetic multiplication on RPL. I remember a few decade when I try to use power exponentiation of [[1 1][1 0]] to the n to directly get Fn value. Hard time discovering sadly that the matrix exponentiation on the HP-28C/S doesn't work with ^ instruction.

(10-13-2021 06:26 PM)Dave Britten Wrote:  I think you guys have figured out the gist of it.
The solution in the book is to set FIX 0, and fill the stack thusly:

T: phi
Z: phi
Y: phi
X: 1/SQRT(5)

Where phi is the golden ratio: (SQRT(5)+1)/2. The 1/SQRT(5) term is derived from Binet's formula.

OK, now I can publish my completed trace print.
[attachment=9914]

(10-13-2021 07:35 PM)David Hayden Wrote:
(10-13-2021 07:11 PM)Gerson W. Barbosa Wrote:  0 1 + Then repeat RCL + ST L
That's it!

I can't applied this trick neither on my HP-41C that miss memory recall arithmetic, nor on my HP-15C who have recall arithmetic but no stack register manipulation.
The amazing HP 42S (or succedanea DM 42S or Free 42) is really a blend of the two anthology systems.

At least, like the HP-25, the HP-41 and HP-15C need a two steps naked program « LASTx + », close to a simple RPL code leaving the Fibonacci sequence reversed in the stack initiate by 1 DUP and repeating « OVER OVER + » over and over...
 « Next Oldest | Next Newest »

 Messages In This Thread HP 25 Fibonacci sequence in one program step - Dave Britten - 10-13-2021, 01:03 PM RE: HP 25 Fibonacci sequence in one program step - rprosperi - 10-13-2021, 01:23 PM RE: HP 25 Fibonacci sequence in one program step - Joe Horn - 10-13-2021, 02:02 PM RE: HP 25 Fibonacci sequence in one program step - Dave Britten - 10-13-2021, 02:19 PM RE: HP 25 Fibonacci sequence in one program step - Joe Horn - 10-13-2021, 02:36 PM RE: HP 25 Fibonacci sequence in one program step - Paul Dale - 10-13-2021, 01:30 PM RE: HP 25 Fibonacci sequence in one program step - Valentin Albillo - 10-13-2021, 02:30 PM RE: HP 25 Fibonacci sequence in one program step - Dave Britten - 10-13-2021, 02:43 PM RE: HP 25 Fibonacci sequence in one program step - C.Ret - 10-13-2021, 04:00 PM RE: HP 25 Fibonacci sequence in one program step - Gerson W. Barbosa - 10-13-2021, 04:42 PM RE: HP 25 Fibonacci sequence in one program step - Dave Britten - 10-13-2021, 06:26 PM RE: HP 25 Fibonacci sequence in one program step - Mike T. - 10-13-2021, 11:34 PM RE: HP 25 Fibonacci sequence in one program step - David Hayden - 10-13-2021, 06:53 PM RE: HP 25 Fibonacci sequence in one program step - Gerson W. Barbosa - 10-13-2021, 07:11 PM RE: HP 25 Fibonacci sequence in one program step - David Hayden - 10-13-2021, 07:35 PM RE: HP 25 Fibonacci sequence in one program step - Dave Britten - 10-13-2021, 07:47 PM RE: HP 25 Fibonacci sequence in one program step - C.Ret - 10-14-2021 10:03 AM RE: HP 25 Fibonacci sequence in one program step - Albert Chan - 10-14-2021, 02:13 PM RE: HP 25 Fibonacci sequence in one program step - rprosperi - 10-14-2021, 07:04 PM RE: HP 25 Fibonacci sequence in one program step - rprosperi - 10-13-2021, 08:34 PM RE: HP 25 Fibonacci sequence in one program step - Didier Lachieze - 10-13-2021, 10:07 PM RE: HP 25 Fibonacci sequence in one program step - rprosperi - 10-14-2021, 01:27 AM RE: HP 25 Fibonacci sequence in one program step - Gerson W. Barbosa - 10-14-2021, 03:45 AM RE: HP 25 Fibonacci sequence in one program step - Gerson W. Barbosa - 10-16-2021, 02:55 PM RE: HP 25 Fibonacci sequence in one program step - Gerson W. Barbosa - 10-17-2021, 02:17 PM

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