Handbook
Glossary
fixnum-log2 ( x -- n )
Vocabulary
math
.
integers
.
private
Inputs
x
an
object
Outputs
n
an
object
Definition
USING:
kernel
kernel.private
math
math.private
;
IN:
math.integers.private
:
fixnum-log2
( x -- n )
{
fixnum
}
declare
0
swap
[
dup
1
eq?
]
[
[
1
fixnum+fast
]
[
2/
]
bi*
]
until
drop
;