random numbers

  • Thread starter Thread starter Ariel
  • Start date Start date
A

Ariel

I Need to get a Random number from an exponential distibution.

Lets says I need a number between 1 to 100, the meanning of the exponential distribution is that

the probability of each number to get selected is diffrent.

please help.

ariel
 
What is wrong with exp( double(rand() / rand_max )) ?

Ariel said:
I Need to get a Random number from an exponential distibution.

Lets says I need a number between 1 to 100, the meanning of the
exponential distribution is that
 
Back
Top