id summary reporter owner description type status milestone component version severity resolution keywords cc 2703 lagged_fibonacci_01::seed() bug rick68@… No-Maintainer "Hi, In line309: template[[BR]] line310: void seed(It& first, It last)[[BR]] line311: {[[BR]] line312:#ifndef BOOST_NO_STDC_NAMESPACE[[BR]] line313: // allow for Koenig lookup[[BR]] line314: using std::fmod;[[BR]] line315: using std::pow;[[BR]] line316:#endif[[BR]] line317: unsigned long mask = ~((~0u) << (w%32)); // now lowest w bits set[[BR]] line318: RealType two32 = pow(RealType(2), 32);[[BR]] line319: unsigned int j;[[BR]] line320: for(j = 0; j < long_lag && first != last; ++j, ++first) {[[BR]] line312: x[j] = RealType(0);[[BR]] line313: for(int k = 0; k < w/32 && first != last; ++k, ++first)[[BR]] line314: x[j] += *first / pow(two32,k+1);[[BR]] line315: if(first != last && mask != 0)[[BR]] line316: x[j] += fmod((*first & mask) / _modulus, RealType(1));[[BR]] line317: }[[BR]] line318: i = long_lag;[[BR]] line319: if(first == last && j < long_lag)[[BR]] line320: throw std::invalid_argument(""lagged_fibonacci_01::seed"");[[BR]] line321: }[[BR]] line 313 maybe rewrite to: for(int k = 0; k < w/32 && first != last; ++k) because of the first ""for loop"" can't be broken. " Bugs closed Boost 1.38.0 random Boost 1.37.0 Problem fixed Jens.Maurer@… rick68@…