(gamma-random>1) ( alpha beta rnd -- n )


Vocabulary
random.private

Inputs
alphaan object
betaan object
rndan object


Outputs
nan object


Definition


:: (gamma-random>1) ( alpha beta rnd -- n )
2.0 alpha * 1 - sqrt :> ainv alpha 4.0 log -
:> bbb alpha ainv + :> ccc 0 :> r! 0 :> z! 0 :> result! [
r
{ [ 1.0 4.5 log + + z 4.5 * - 0 >= ] [ z log >= ] } 1||
not
] [
rnd random-unit* :> u1 rnd random-unit* :> u2 u1 1.0 u1
- / log ainv / :> v alpha v e^ * :> x u1 sq u2 *
z! bbb ccc v * + x - r! x beta * result!
] do while result ;