Re: random number problem
From: copx (invalid_at_invalid.com)
Date: 07/09/04
- Next message: Richard Steiner: "Re: Universal iconic language -"
- Previous message: Jörn W. Janneck: "Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management"
- In reply to: Jens.Toerring_at_physik.fu-berlin.de: "Re: random number problem"
- Next in thread: Paul Hsieh: "Re: random number problem"
- Reply: Paul Hsieh: "Re: random number problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Richard Steiner: "Re: Universal iconic language -"
- Previous message: Jörn W. Janneck: "Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP and memory management"
- In reply to: Jens.Toerring_at_physik.fu-berlin.de: "Re: random number problem"
- Next in thread: Paul Hsieh: "Re: random number problem"
- Reply: Paul Hsieh: "Re: random number problem"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|