[ODE] dRandInt Crash Fix
George Birbilis
birbilis at kagi.com
Thu Jun 23 01:01:41 MST 2005
it makes one wonder why there's not some CPU instruction to return a random
number (or is there one at Intel CPUs?). If it also had some engine to
return really random numbers (using noise from the system [heat etc.])
-----
George Birbilis (birbilis at kagi.com)
Microsoft Most Valuable Professional
MVP J# for 2004 & 2005
http://www.kagi.com/birbilis
QuickTime, Delphi, ActiveX, .NET, IPC
--------------
----- Original Message -----
From: "Adam D. Moss" <adam at gimp.org>
To: "ode" <ODE at q12.org>
Sent: Wednesday, June 22, 2005 1:50 PM
Subject: Re: [ODE] dRandInt Crash Fix
> Adam D. Moss wrote:
>> I think that what it intends to do is:
>>
>> int dRandInt (int n)
>> {
>> double a = double(n-1) / 4294967296.0;
>
> Forget that, it's kinda bogus. However, it leaves your
> strange problem unexplained. Are you using D3D and letting
> it lower the x87 internal accuracy?
>
> Meanwhile I think I'm happier with the xor-folding int
> implementation anyway...
>
> --adam
> --
> Adam D. Moss - adam at gimp.org
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
More information about the ODE
mailing list