Boost logo

Boost Users :

Subject: Re: [Boost-users] [Random] uniform_01
From: Oei, YC (oei.yungchin_at_[hidden])
Date: 2009-07-09 13:33:16


Hi Rob!

> I do not understand the problem.  I looked at the code, which does what
> I expect.  Why is it a problem if some of the mantissa bits are not
> 'random'?  As I understand the requirement is the real numbers are
> uniformly distributed; the bit patterns should not matter provided they
> represent numbers with the right mathematical properties.

As far as I understand (sorry for starting with a big disclaimer but
I'm mostly just a user), the thing is that uniform_01 does not change
its behaviour if you couple it with a generator that produces 32bit
integers (like the mersenne twister ones). If you need sufficient
random bits to fill a double with, you should really be drawing two
integers from the generator, but I don't think that's what happens.

Yung-Chin


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net