Post Reply 
(49G) Integer Square Detection
10-12-2015, 12:08 PM
Post: #4
RE: HP 49G: Integer Square Detection
So here a compilable version of ISSQ?

Code:

::
  CK1&Dispatch
  # FF
  ::
    ::
      1LAMBIND
      TRUE
      NIBHEX 4162090000B320
      ZINT 11
      NIBHEX 4162071000316410668910A81210
      ZINT 65
      NIBHEX 41620510003920542103842040
      ZINT 63
      NIBHEX 41620510003120302021202020
      ZINT 64
      BINT5
      ONE_DO
      ::
        1GETLAMSWAP_
        FPTR2 ^ZMod
        FPTR2 ^Z>#
        FPTR2 ^ZBit?
        SWAPDROP
        ?SEMI
        ISTOP-INDEX
        #2*
        #1-
        NDROP
        FALSE
        ExitAtLOOP
      ;
      LOOP
      1GETABND
      SWAP
      NOTcsdrpfls
      ::
        DUP
        Z2_
        Z<
        DUP
        ?SEMI
        DROPDUP
        FPTR2 ^Z>ZH
        FPTR2 ^ZBits
        BINT2
        #/
        #+
        Z2_
        SWAP
        FPTR2 ^PPow#
        BEGIN
        SWAPDROPDUP
        3PICKOVER
        FPTR2 ^ZQUOText
        FPTR2 ^QAdd
        Z2_
        FPTR2 ^ZQUOText
        2DUP
        Z>
        NOT_UNTIL
        DROPDUP
        FPTR2 ^ZSQ_
        ROT
        EQUAL
      ;
      SWAPDROP
    ;
    COERCEFLAG
  ;
;
@
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(49G) Integer Square Detection - Gerald H - 10-11-2015, 06:48 AM
RE: HP 49G: Integer Square Detection - Gerald H - 10-12-2015 12:08 PM



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