Post Reply 
[SOLVED] DSRN (dog slow roman numerals)
06-13-2014, 01:01 AM
Post: #16
RE: DSRN (dog slow roman numerals)
(06-12-2014 09:17 PM)Thomas Klemm Wrote:  Yet another variant without using a subroutine:
...
PS: I tried using DOLIST...

I kept thinking there would be a DOLIST option for this as well. I'm not sure how the following compares with the rest speed-wise, but I did finally find a way to shoehorn a DOLIST (and a sigmaLIST) into the mix.

Code:

\<<
    { } SWAP
    { 1000 900 500 400 100 90 50 40 10 9 5 4 1 }    
        
    1 13 FOR n
        DUP n GET
        ROT SWAP IDIV2
        ROT ROT 4 ROLL
        SWAP + UNROT
    NEXT
    DROP2
    
    { "M" "CM" "D" "CD" "C" "XC" "L" "XL" "X" "IX" "V" "IV" "I" } SWAP
    2 \<< NDUPN DROP \>> DOLIST
    \GSLIST
\>>
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: DSRN (dog slow roman numerals) - HP67 - 06-11-2014, 07:06 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 11:44 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 04:49 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-15-2014, 12:02 PM
RE: DSRN (dog slow roman numerals) - HP67 - 06-16-2014, 06:09 AM
RE: DSRN (dog slow roman numerals) - HP67 - 06-12-2014, 05:46 PM
RE: DSRN (dog slow roman numerals) - DavidM - 06-13-2014 01:01 AM



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