This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

pareto


In pareto.c the 2nd and 3rd arguments are reversed compared
to the description in the documentation.
The src also scales x by mu which is not mentioned in the doc.

src:
/* The Pareto distribution has the form,
   p(x) dx = (a/mu) / (x/mu)^(a+1) dx     for x >= mu
 */
double
gsl_ran_pareto (const gsl_rng * r, double mu, const double a)

doc: 
Random: double gsl_ran_pareto (const gsl_rng * r, double a, double b) 
This function returns a random number from the Pareto distribution of order a. The distribution function is, 

       p(x) dx = a b^a / x^{a+1} dx
       for x >= b 

Also, it is bad to use the symbol `mu' when it is not the mean.
Keith
+-------------------------------------------------------------------+
| Dr. Keith M. Briggs, Complexity Research Group, BT Research Labs. |
| Adastral Park admin2 pp5, Martlesham Heath, IP5 3RE, Suffolk,  UK |
| Tel. 01473 641 911  Fax. 01473 647 410.  Home tel:  01473 625 972 |
| www.bt.com | personal homepage:  innovate.bt.com/people/briggsk2/ |
+-------------------------------------------------------------------+

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]