Re: 32-bit random numbers
Pete Lomax wrote:
> On Sat, 03 Jul 2004 20:44:00 +0200, Juergen Luethje <j.lue at gmx.de>
> wrote:
>
>> That's what Derek's code does, too, if I understand it correctly.
>> If two highly skilled software-engineers say so, I think it's not a bad
>> idea.
>
> I was about to suggest the same, but was beaten to it
> As I think was said, I would also have noted that #00010001,
> #00020002, etc will be less likely., but then again rand() itself is
> not perfect.
*Concatenation* of two uniformly distributed 16-bit values -- as Derek
and Rob suggested -- should IMHO result in a uniform distribution, too.
Rob said, that *addition* of two uniformly distributed values does
result in a distribution, that is not uniform.
Regards,
Juergen
|
Not Categorized, Please Help
|
|