[Bug libstdc++/43660] range of random-number generator seems wrong/confusing

2010-04-06 Thread redi at gcc dot gnu dot org
--- Comment #1 from redi at gcc dot gnu dot org 2010-04-06 10:38 --- n1933 is ancient history, the RNG pieces have changed significantly In the current draft it says: A uniform_int_distribution random number distribution produces random integers i, a = i = b So it is a closed interval

[Bug libstdc++/43660] range of random-number generator seems wrong/confusing

2010-04-06 Thread redi at gcc dot gnu dot org
--- Comment #2 from redi at gcc dot gnu dot org 2010-04-06 10:40 --- (In reply to comment #0) [Note that the same issue exists with other ways of invoking using the generator (e.g., a std::uniform_real_distributionfloat with bounds of 0 and 1 will indeed return 1); but it's less

[Bug libstdc++/43660] range of random-number generator seems wrong/confusing

2010-04-06 Thread redi at gcc dot gnu dot org
--- Comment #3 from redi at gcc dot gnu dot org 2010-04-06 10:53 --- (In reply to comment #0) As best as I can tell, std::random_shuffle wants its random-number generating functor to return results in the range [0,N), where N is the parameter it passes to the functor; i.e