Re: question about random generator



Antonio wrote:
> pete wrote:
> > Does "pseudo-random" mean the same thing as "uniformly distributed" ?
>
> Completely OT, but anyway... No, pseudo-random means that it looks like
> it's random but it really isn't. There is no way to generate trully
> random numbers with a computer, everything you do is deterministic, but
> you can generate sequences that look like they're random but that
> aren't. Hence the term _pseudo_-random.

Yes, we know, you didn't say anything that wasn't completely obvious.
The C Standard specifies that rand() generates pseudo-random numbers,
the questions is whether a conforming implementation could generate a
series of normal distributed numbers via the rand() function or if the
term pseudo-random implies that the numbers must be generated with a
uniform distribution. I was wondering the same thing myself, I think
the intention is that the numbers be uniform but that may be debatable.

Robert Gamble

.



Relevant Pages

  • Re: random lottery draw funciton
    ... from approximately 18,000 shares. ... I believe rand() uses your operating system's default randsystem call, ... the quality of the pseudo-random numbers depends on your system. ... http://www.andyhsoftware.co.uk/space:: disk and FTP usage analysis tool ...
    (comp.lang.php)
  • Re: Truly random?
    ... Computers aren't very good at generating truly ... If you need truly random numbers for cryptography, a PRNG won't ... If calling rand() or randomalone slows down ... a pseudo-random number. ...
    (comp.lang.c)
  • Re: How to generate random numbers in C
    ... Computers do not generate truly random numbers without hardware support. ... You may want pseudo-random numbers. ... process ID (but NOT in applications where real random numbers are needed, ... the return type of rand() ...
    (comp.lang.c)
  • Re: Way for computing random primes in standard C.
    ... number which is also pseudo-random? ... probabilities for all the primes that are at most 32 bits. ... Does it mean that further calls to rand() will return numbers with a new ... how is it different to calling srand() with a ...
    (comp.lang.c)
  • Re: Why will this not generate a random number!?
    ... >education is mainly based on object oriented design theory where Java ... I cannot for the life of me generate a random number. ... rand() does not generate random numbers. ... How do you know the result you got is NOT pseudo-random? ...
    (comp.lang.c)