Handbook
Glossary
zipf-random* ( a rnd -- n )
Vocabulary
random
Inputs
a
an
object
rnd
an
object
Outputs
n
an
object
Definition
USING:
kernel
math
math.functions
;
IN:
random
::
zipf-random*
( a rnd -- n )
a 1.0
-
:>
am1 2.0 am1
^
:>
b 1.0 rnd
random-unit*
-
:>
U rnd
random-unit*
:>
V U am1
recip
neg
^
floor
:>
X 1.0 X
recip
+
am1
^
:>
T V X
*
T 1.0
-
*
b 1.0
-
/
T b
/
<=
[
X
]
[
a rnd
zipf-random*
]
if
;