Handbook
Glossary
log ( x -- y )
Factor handbook
»
The language
»
Numbers
»
Mathematical functions
»
Powers and logarithms
Prev:
cis ( arg -- z )
Next:
log1+ ( x -- y )
Vocabulary
math
.
functions
Inputs
x
a
number
Outputs
y
a
number
Word description
Natural logarithm function. Outputs negative infinity if
x
is 0.
Definition
IN:
math.functions
GENERIC:
log
( x -- y )
Methods
USING:
math
math.functions
math.functions.private
;
M:
bignum
log
[
log
]
log-2
(bignum-log)
;
USING:
kernel
math
math.functions
math.libm
;
M:
complex
log
>polar
[
flog
]
dip
rect>
;
inline
USING:
kernel
math
math.functions
math.libm
;
M:
float
log
dup
0.0
>=
[
flog
]
[
0.0
rect>
log
]
if
;
inline
USING:
math
math.functions
;
M:
real
log
>float
log
;
inline