Post Reply 
(49G) Integer "Natural" Logarithm
07-06-2015, 09:41 AM (This post was last modified: 06-15-2017 01:45 PM by Gene.)
Post: #1
(49G) Integer "Natural" Logarithm
For integer input the programme returns the integer "natural " logarithm.

For information refer to

http://oeis.org/A061373

Code:

::
  CK1&Dispatch
  # FF
  ::
    FPTR2 ^ZABS
    ZEROSWAP
    Z1_
    FPTR2 ^RADDext
    ONE{}N
    BEGIN
    INNERCOMP
    NULL{}
    SWAP
    ZERO_DO
    SWAP
    Z1_
    FPTR2 ^RSUBext
    FPTR2 ^NFactor
    &COMP
    LOOP
    '
    Z>
    FPTR2 ^SortList
    BEGIN
    DUPLENCOMP
    #0=ITE
    FalseFalse
    ::
      DUP
      CARCOMP
      DUP
      Z6_
      Z<
    ;
    WHILE
    ::
      FPTR2 ^Z2BIN
      ROT+SWAP
      CDRCOMP
    ;
    REPEAT
    DROP
    DUPLENCOMP
    DUP
    4ROLL
    #+
    3UNROLL
    #0=
    UNTIL
    DROP
    FPTR2 ^#>Z
  ;
;
Find all posts by this user
Quote this message in a reply
Post Reply 




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