Post Reply 
N-Queens on 50g (RPL language)
11-18-2014, 07:39 AM (This post was last modified: 11-18-2014 10:39 AM by Werner.)
Post: #11
RE: N-Queens on 50g (RPL language)
Xerxes,
the RPL is compatible with the 48 (S,G and GX) as well.
The dots after the numbers are only needed for the 49 and 50, as these have the integer type, and I want reals (they are much faster). Depending on the state of flag 51, the dot must be a period (clear) or a comma (set).
As for SysRPL, here's a quick transcript of the RPL:

Code:
::
  ZERO
  BEGIN
    EIGHT SWAP#1+
    ::
    BEGIN
      2DUP
      BEGIN
        #1-
        2DUP FIVE #+PICK 2DUP#> IT SWAP #-
        2DUP#+ 2#0=OR 
      UNTIL
      #0=case AGAIN
      DROPSWAP
      BEGIN DUP#1=
      WHILE #-SWAP
      REPEAT
      #1-SWAP
    AGAIN
    ;
    DROPRDROP
    EIGHT OVER#=
  UNTIL
  ZERO_DO
    8ROLL UNCOERCE
  LOOP
  EIGHT {}N
;
@

Cheers, Werner

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: N-Queens on 50g (RPL language) - Han - 11-06-2014, 03:29 AM
RE: N-Queens on 50g (RPL language) - Werner - 11-18-2014 07:39 AM
RE: N-Queens on 50g (RPL language) - Bruno - 09-08-2015, 10:41 AM
RE: N-Queens on 50g (RPL language) - Han - 11-20-2014, 08:53 AM



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