07-06-2015, 09:41 AM
For integer input the programme returns the integer "natural " logarithm.
For information refer to
http://oeis.org/A061373
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
;
;