Re: random number problem

From: copx (invalid_at_invalid.com)
Date: 07/09/04


Date: Fri, 9 Jul 2004 20:00:12 +0200


<Jens.Toerring@physik.fu-berlin.de> schrieb im Newsbeitrag news:2l845qF9e8jmU2@uni-berlin.de...
> copx <invalid@invalid.com> wrote:
[snip]
> > random_int = (rand() * max) + min
>
> > And I think this additional step destroys the uniformity..
>
> Why should it do that? It's a simple linear transformation.
> If you have uniformly distributed points drawn on an elastic
> band and then stretch it they stay uniformly ditributed.
> And a simple multiplication does nothing else (and adding an
> offset doesn't change anything).

Really? Well, I guess you're right because I really don't
know sh*t about mathematics (I'm just a hobby coder)
and you sound like you know what you're talking about.

Thank you,
copx



Relevant Pages

  • Re: What the hell am I doing?
    ... The Beatles were involved in me going mad. ... charisma - but I'm telling you that is a band that had it, ... Metallica do a Motorhead cover and Motorhead do a Metallica cover. ...
    (uk.people.support.depression)
  • Re: ATTN: Dat & Demo
    ... I saw them play two nights running at ... I would have thought the full band would travel. ... > Now, y'see, autographs do nothing for me. ...
    (uk.sport.football)
  • Re: Cruise Ships
    ... Peter H. Granzeau writes: ... accuse first, then admit that the ... the band wouldn't meet whatever the ...
    (rec.music.classical)
  • Re: Looting in New Orleans
    ... >>> there are areas of New Orleans the National Guard are refusing to enter ... , so the claim that the band is all that is ...
    (sci.military.naval)
  • Re: Spinning Star Problem
    ... surface of an elastic band towards your hand, ... which is holding one end of the band. ... start stretching the elastic so that the rate ...
    (sci.physics)