Post Reply 
Programming exercise (RPL/RPN) - Reciprocal Fibonacci Constant
02-17-2017, 07:29 AM (This post was last modified: 02-17-2017 10:46 AM by Paul Dale.)
Post: #6
RE: Programming exercise (RPL/RPN) - Reciprocal Fibonacci Constant
How's this:

Code:
    STO 00
    CLR STK
    ISG X
    LBL 00
        STO+ Y
        1/x
        STO+ Z
        1/x
        x<>y
        DSE 00
            GTO 00
    RCL Z

Twelve steps, eighteen bytes. This doesn't use any functions they don't have, although the accuracy won't be so great.

In thirteen steps, twenty bytes and no register:

Code:

    0
    ENTER
    ENTER
    ISG X
    LBL 00
        STO+ Y
        1/x
        STO+ Z
        1/x
        x<>y
        DSE T
            GTO 00
    RCL Z


Pauli
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming exercise (RPL/RPN) - Reciprocal Fibonacci Constant - Paul Dale - 02-17-2017 07:29 AM



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