|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[Random] uniform_01Hi,
I was looking at the docs for the uniform_01 distribution: http://www.boost.org/doc/libs/1_39_0/libs/random/random-distributions.html#uniform_01 I read the following note "Note: The current implementation is buggy, because it may not fill all of the mantissa with random bits." 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. Thanks Robert Patterson http://como.cheng.cam.ac.uk/index.php?Page=People&Section=riap2 _______________________________________________ Boost-users mailing list Boost-users@... http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
|
Re: [Random] uniform_01Hi 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 mailing list Boost-users@... http://lists.boost.org/mailman/listinfo.cgi/boost-users |
|
|
Re: [Random] uniform_01Indeed this vague mention leaves you with no idea of weather you can use that or not. It would be great if this note would be made more verbose.
On Thu, Jul 9, 2009 at 1:59 PM, Robert Patterson <riap2@...> wrote: Hi, _______________________________________________ Boost-users mailing list Boost-users@... http://lists.boost.org/mailman/listinfo.cgi/boost-users |
| Free embeddable forum powered by Nabble | Forum Help |