Post Reply 
(50g) Fun with Farey sequences
06-24-2015, 10:23 PM
Post: #10
RE: (50g) Fun with Farey sequences
(06-23-2015 09:54 AM)Gerald H Wrote:  
Code:
    5UNROLL         ( … a b c d )
    4ROLL           ( … b c d a )
    4ROLL           ( … c d a b )
    2GETLAM         ( … c d a b n )
    OVER#+          ( … c d a b n+b )
    4PICK           ( … c d a b n+b d )
    #/              ( … c d a b k )
    SWAPDROP        ( … c d a k )

Couldn't that be replaced by:
Code:
    5UNROLL         ( … a b c d )
    4ROLL           ( … b c d a )
    4ROLL           ( … c d a b )
    2GETLAM         ( … c d a b n )
    #+              ( … c d a n+b )
    3PICK           ( … c d a n+b d )
    #/              ( … c d a k )

Unfortunately I'm not familiar with the HP-49/50. In addition to that I wasn't able to compile your program successfully with Debug4x. It appears to be a problem with flash-pointers:

Entry FPTR2 does not exist.

Therefore I can't run the program and must admit that I don't fully understand what's going on in this section:
Code:
    OVER
    FPTR2 ^#>Z
    OVER
    FPTR2 ^#>Z
    FPTR2 ^NDXFext

Would you mind explaining it? Maybe even provide stack diagrams as comment?
Without these I would have had a hard time to understand how the HP-48 is calculating complex arccos and arcsin functions.

Kind regards
Thomas
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(50g) Fun with Farey sequences - Tugdual - 06-15-2015, 08:37 PM
RE: (50g) Fun with Farey sequences - Thomas Klemm - 06-24-2015 10:23 PM



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