I'm not sure if this is a bug - but I would not
think that a randoim number generator should produce nans
gsl_ran_dirichlet gives nan when given small values for
parameters.
An example program that shows this is at the end of this email
#include "gsl/gsl_rng.h"
#include "gsl/gsl_randist.h"
int main(void)
{
double a[2],b[2];
gsl_rng *r;
a[0]=1.0;
a[1]=1.0;
r=gsl_rng_alloc(gsl_rng_mt19937);
gsl_rng_set(r,1);
int i;
for (i=1;i<=10;i++) {
a[0]/=10.0;
a[1]/=10.0;
gsl_ran_dirichlet(r,2,a,b);
printf("(%g,%g): %g %g\n",a[0],a[1],b[0],b[1]);
}
}
_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl