random numbers

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ariel

    #1

    random numbers

    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

    ---
    Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
  • Michael Cornelison

    #2
    Re: random numbers

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

    "Ariel" <arielbit@-NOSPAM-tadcomm.com> wrote in message
    news:%23ADBRQ8l DHA.2140@TK2MSF TNGP09.phx.gbl. ..[color=blue]
    > 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[/color]
    exponential distribution is that[color=blue]
    >
    > the probability of each number to get selected is diffrent.
    >
    > please help.
    >
    > ariel
    >
    > ---
    > Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/[/color]


    Comment

    • Ferdinand Oeinck

      #3
      Re: random numbers

      Never heard of a Gaussian distribution? Never had decent math in school?

      "Michael Cornelison" <noname@nowhere .com> wrote in message
      news:bn7om1$3op $1@ngspool-d02.news.aol.co m...[color=blue]
      > What is wrong with exp( double(rand() / rand_max )) ?
      >
      > "Ariel" <arielbit@-NOSPAM-tadcomm.com> wrote in message
      > news:%23ADBRQ8l DHA.2140@TK2MSF TNGP09.phx.gbl. ..[color=green]
      > > 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[/color]
      > exponential distribution is that[color=green]
      > >
      > > the probability of each number to get selected is diffrent.
      > >
      > > please help.
      > >
      > > ariel
      > >
      > > ---
      > > Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/[/color]
      >
      >[/color]


      Comment

      Working...