diff --git a/lemon/random.h b/lemon/random.h --- a/lemon/random.h +++ b/lemon/random.h @@ -795,7 +795,7 @@ nu=V0*std::exp(-xi); } } while(nu>std::pow(xi,delta-1.0)*std::exp(-xi)); - return theta*(xi-gamma(int(std::floor(k)))); + return theta*(xi+gamma(int(std::floor(k)))); } /// Weibull distribution @@ -819,7 +819,7 @@ /// double pareto(double k,double x_min) { - return exponential(gamma(k,1.0/x_min)); + return exponential(gamma(k,1.0/x_min))+x_min; } /// Poisson distribution