TRandom PoissonD returns int

From: Michele Selvaggi <Michele.Selvaggi_at_cern.ch>
Date: Fri, 16 Mar 2012 11:27:53 +0000


Dear ROOT experts,

I am trying to generate random numbers according to a poisson distribution. I need non integer values. I thought the PoissonD method does the job, but i seem do get only int as an output.

TRandom *rd = new TRandom();
cout<<rd->Poisson(5)<<endl;

I get as expected an integer, but if I do

cout<<rd->PoissonD(5)<<endl;

then I also get an integer.. Maybe I am using the wrong method? Isn't the continuous version of a poissonian still called a poissonian?

Thanks

Michele Received on Fri Mar 16 2012 - 12:27:59 CET

This archive was generated by hypermail 2.2.0 : Fri Mar 16 2012 - 17:50:11 CET