Ticket #5767: random.patch
File random.patch, 559 bytes (added by , 11 years ago) |
---|
-
boost/random/mersenne_twister.hpp
175 175 176 176 // fix up the state if it's all zeroes. 177 177 if((x[0] & (~static_cast<UIntType>(0) << r)) == 0) { 178 for(std::size_t j = 1; i< n; ++j) {178 for(std::size_t j = 1; j < n; ++j) { 179 179 if(x[j] != 0) return; 180 180 } 181 181 x[0] = static_cast<UIntType>(1) << (w-1);