gen_exp function

Safely generate random exponential data