Handbook
Glossary
(bignum-log) ( n log-quot: ( x -- y ) log-2 -- log )
Vocabulary
math
.
functions
.
private
Inputs
n
an
object
log-quot
a
quotation
with stack effect
( x -- y )
log-2
an
object
Outputs
log
an
object
Definition
USING:
kernel
math
math.functions
;
IN:
math.functions.private
:
(bignum-log)
( n log-quot: ( x -- y ) log-2 -- log )
dupd
[
[
[
>float
]
]
dip
compose
]
2dip
[
*
]
curry
[
[
[
frexp
]
]
dip
]
dip
[
bi*
+
]
2curry
compose
[
[
[
dup
representable-as-float?
]
]
dip
]
dip
[
if
]
2curry
compose
call
;
inline