Post Reply 
(49G) OEIS A178225: Test for Binary-Palindromicity
02-25-2018, 09:43 AM
Post: #3
RE: (49G) OEIS A178225: Test for Binary-Palindromicity
Here the definitive version of the programme, a model of elegance, shortest & fastest possible.

I'm sure no one can find an improvement - I'd be amazed if you did!

Size: 105.

CkSum: # 2C8Eh

Code:
::
  CK1&Dispatch
  # FF
  ::
    %1
    SWAPDUP
    ZINT 2
    Z<
    caseDROP
    FPTR2 ^Z>ZH
    FPTR2 ^ZBits
    DUPUNROT
    BINT2
    #/
    #+
    ZERO_DO
    SWAP#1-SWAP
    OVER
    FPTR2 ^ZBit?
    SWAPINDEX@
    FPTR2 ^ZBit?
    ROT
    EQUAL
    ?SKIP
    ::
      ROTDROP
      %0
      3UNROLL
      ExitAtLOOP
    ;
    LOOP
    2DROP
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (49G) OEIS A178225: Test for Binary-Palindromicity - Gerald H - 02-25-2018 09:43 AM



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