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
 
Never heard of a Gaussian distribution? Never had decent math in school?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top