Sampling from an exponential probability distribution