Handbook
Glossary
integer-log10 ( x -- n )
Integer logarithms
Prev:
integer-log2 ( x -- n )
Vocabulary
math.functions.integer-logs
Inputs
x
a positive rational number
Outputs
n
an
integer
Word description
Outputs the largest integer
n
such that
10^n
is less than or equal to
x
.
Errors
Throws an error if
x
is zero or negative.
Definition
USING:
math.functions.integer-logs.private
;
IN:
math.functions.integer-logs
:
integer-log10
( x -- n )
[
(integer-log10)
]
(integer-log)
;
inline