Different results for uniform random number generation between D and Boost

Era Scarecrow rtcvb32 at yahoo.com
Tue Jul 31 09:22:52 PDT 2012


On Tuesday, 31 July 2012 at 01:00:38 UTC, Nick Sabalausky wrote:

> My (limited) understanding is that it's almost practically 
> impossible to get consistency in x86 floating point unless 
> you're using SSE:
>
> http://www.yosefk.com/blog/consistency-how-to-defeat-the-purpose-of-ieee-floating-point.html
>
> Maybe the effect you're observing could be related to what he 
> describes?

  I don't suppose there's an emulated floating type (like is 
optionally available in the linux kernel) that could be used in 
place of normal floating point? I wonder if the C++ version is 
wrong; In walter's article regarding floating point he brought 
out that few applications in C++ set/reset the register for 
floating point between operations or between functions (when they 
change)... Or was that between applications as a whole (And an 
occasional OS issue)?

  Is the problem be even worse if you mixed MMX and FPU (Since 
they use the same registers, just a different mode)?


More information about the Digitalmars-d mailing list