HP Forums

Full Version: (48G 49 50g) INVERT Transform
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Reference URL's