Post Reply 
[SOLVED] DSRN (dog slow roman numerals)
06-15-2014, 02:58 AM
Post: #30
RE: DSRN (dog slow roman numerals)
(06-14-2014 07:36 AM)Thomas Klemm Wrote:  
(06-14-2014 12:38 AM)Dave Britten Wrote:  This is a pretty fast NDUPN replacement.
Code:
\<< \-> X \<< 2 X START DUP NEXT X \>> \>>

Since we need NDUPN DROP we could avoid the local variable:
Code:
\<< 2 SWAP START DUP NEXT \>>

Quote:I don't know if it responds the same way as a real 50g if you feed it nonsense, though (e.g. n < 2).

Unfortunately this nonsensical case happens often.

Cheers
Thomas

Alright, here's an NDUPN that behaves a little more like the 50G if you feed it a negative/zero/non-integer N:

Code:
\<< 0 RND 0 MAX \-> X N
  \<<
    IF N
    THEN 1 N
      START X
      NEXT
    END N
  \>>
\>>
Visit this user's website 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) - Dave Britten - 06-15-2014 02:58 AM



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