Table 2.
The acceptance–rejection algorithm which is used to sample random numbers which are distributed according to the probability distribution π erfc(z), where . In our simulations, we use constants a1 and a2 given by (2.10).
— Generate a random number ζ1 uniformly distributed in (0,1). |
— Compute exponentially distributed random number ζ2 by . |
— Generate a random number ζ3 uniformly distributed in (0,1). |
— If ζ1ζ3<a2 erfc(ζ2), then choose ζ2 as a sample from the probability distribution π erfc(z). Otherwise, repeat the algorithm. |