Handbook
Glossary
random-integer-loop ( m obj -- n )
Vocabulary
random.private
Inputs
m
an
object
obj
an
object
Outputs
n
an
object
Definition
USING:
kernel
math
random
;
IN:
random.private
::
random-integer-loop
( m obj -- n )
obj
random-32*
32 m
next-power-of-2-bits
32
-
[
dup
0
>
]
[
[
32
shift
obj
random-32*
+
]
[
32
+
]
[
32
-
]
tri*
]
while
drop
[
m
*
]
[
neg
shift
]
bi*
;
inline