Handbook
Glossary
next-power-of-2-bits ( m -- numbits )
Vocabulary
random
.
private
Inputs
m
an
object
Outputs
numbits
an
object
Definition
USING:
kernel
math
;
IN:
random.private
:
next-power-of-2-bits
( m -- numbits )
dup
2
<=
[
drop
1
]
[
1
-
log2
1
+
]
if
;
inline