
31 Oct
2011
31 Oct
'11
5:15 p.m.
AMDG On 10/29/2011 05:03 PM, Peter Man wrote:
Recently, I've encountered a problem with the generate_uniform_real function (the is_integral version) in boost/random/uniform_real_distribution.hpp. A bug in my code meant that I was trying to generate a uniform random number where the min and max bounds were exactly equal. However, this meant that when on entering the function stated earlier, an infinite loop is never exited from! Is this a bug in boost::random, or have I missed something?
uniform_real_distribution is supposed to produce a value in the range [min, max). This is impossible if min == max, since the range is empty. In Christ, Steven Watanabe