RACIPELIB.c
// Generate random value following exponential distribution with mean equals to m
Generate random value following exponential distribution with mean equals to m
Generate random value following exponential distribution with mean equals to m
double randexp(double m)
{
  double z = 0.0;
  double exp_value = 0.0;
  z = randu(0, 1);
  exp_value = -m * log(z); 
  return(exp_value);
}
double randexp ( double m ) { double z = 0.0 ; double exp_value = 0.0 ; z = randu ( 0 , 1 ) ; exp_value = - m * log ( z ) ; return ( exp_value ) ; }
Generate random value following exponential distribution with mean equals to m
Generate random value following exponential distribution with mean equals to m
// Compute exponential random variable using inversion method