
AMDG On 07/13/2011 11:35 AM, Hongyu Miao wrote:
Sorry to bother you with this. I met a problem with the Random library in the latest release v1.47.
<snip>
However, when I adopted my code to v1.47, the following code failed due to memory access violation after a number of function calls:
double unirand_real(double a, double b) { // Create a random number generator engine static boost::random::mt19937 rng_real(static_cast<unsigned int>(std::time(0)));
// select Uniform probability distribution boost::random::uniform_real_distribution<> dist(a, b);
// return random sample return dist(rng_real); }
I will appreciate your help with this problem as right now I think the Random library may have a bug.
I can't reproduce this problem with MSVC 2010. a) What compiler are you using? b) Can you provide a complete minimal test case that fails? In Christ, Steven Watanabe