Post Reply 
(48G 49 50g) INVERT Transform
04-03-2019, 05:27 PM (This post was last modified: 04-03-2019 05:28 PM by John Keith.)
Post: #1
(48G 49 50g) INVERT Transform
Programs for the INVERT transform and its inverse.

First, the INVERT transform: Explanation of the algorithm here.

Code:

\<< DUP SIZE \-> n
  \<< 1 OVER HEAD 2. \->LIST 2. n
    FOR k OVER 1. k SUB REVLIST OVER * \GSLIST +
    NEXT NIP TAIL
  \>>
\>>

Next, the INVERTi transform, the inverse of the INVERT transform. Confused Explained here.

Code:

\<< DUP SIZE \-> n
  \<< 1 OVER 1. 2. SUB EVAL SWAP - 2. \->LIST 2. n 1. -
    FOR k OVER 1. k SUB REVLIST OVER * \GSLIST PICK3 k 1. + GET SWAP - +
    NEXT NIP
  \>>
\>>

For HP-48G compatibility, replace PICK3 with 3 PICK and replace NIP with SWAP DROP.
Find all posts by this user
Quote this message in a reply
Post Reply 




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