id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 3516,lagged fibonacci cannot be seeded with a value 0 - fails with assertion error,Paul H. Isaacson ,No-Maintainer,"When using the lagged_fibonacci607 and attempting to seed, the attached test program will either stop with an assertion error at line 57 of boost/random/linear_congruential.hpp, or if -DNDEBUG is used during compilation to disable assertions, the returned values are not in range. Seeding with a zero value should not cause such problems. {{{ #include #include #include using namespace std; boost::lagged_fibonacci607 lfrand; inline int fastrand (int range) { return ((int) range * lfrand()); } main (int argc, char **argv) { unsigned int seed; if (argc < 2) { printf (""Usage lftest \n""); exit (1); } sscanf (argv[1], ""%d"", &seed); printf (""using seed value %d\n"", seed); lfrand.seed (seed); for (int n = 0; n < 1000000; n++) { int x = fastrand (10); if (x < 0 || x > 9) printf (""out of range random number[%d] = %d\n"", n, x); } } }}} ",Bugs,closed,Boost 1.41.0,random,Boost 1.40.0,Problem,fixed,lagged fibonacci seed 0,