Post Reply 
(49G) Arabic to Pseudo-Roman Representation (OEIS A093788)
09-04-2015, 08:10 AM
Post: #2
RE: HP 49G: Arabic to Pseudo-Roman Representation (OEIS A093788)
Here a slightly improved version of the programme:

Code:

::
  CK1&Dispatch
  # FF
  ::
    FPTR2 ^DupQIsZero?
    caseSIZEERR
    FPTR2 ^Z>S
    NULL$SWAP
    DUPLEN$
    ZERO_DO
    DUP
    ISTOP-INDEX
    SUB$1#
    BINT48
    #-
    ::
      DUP#0=csDROP
      ::
        BINT1
        #=casedrop
        {
          Z1_
        }
        BINT2
        #=casedrop
        {
          Z1_
          Z1_
        }
        BINT3
        #=casedrop
        {
          Z1_
          Z1_
          Z1_
        }
        BINT4
        #=casedrop
        {
          Z5_
          Z1_
        }
        BINT5
        #=casedrop
        {
          Z5_
        }
        BINT6
        #=casedrop
        {
          Z1_
          Z5_
        }
        BINT7
        #=casedrop
        {
          Z1_
          Z1_
          Z5_
        }
        BINT8
        #=case
        {
          Z1_
          Z1_
          Z1_
          Z5_
        }
        {
          Z10_
          Z1_
        }
      ;
      INNERCOMP
      NULL$SWAP
      ZERO_DO
      SWAP
      Z10_
      JINDEX@
      FPTR2 ^RP#
      FPTR2 ^RMULText
      FPTR2 ^Z>S
      &$
      LOOP
      ROT
      &$SWAP
    ;
    LOOP
    DROP
    FPTR2 ^S>Z
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP 49G: Arabic to Pseudo-Roman Representation (OEIS A093788) - Gerald H - 09-04-2015 08:10 AM



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