This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/43660] range of random-number generator seems wrong/confusing
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Apr 2010 10:40:51 -0000
- Subject: [Bug libstdc++/43660] range of random-number generator seems wrong/confusing
- References: <bug-43660-5724@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla 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_distribution<float> with bounds of
> 0 and 1 will indeed return 1); but it's less clear its a bug in those
> cases (although, for instance, boost's random implementation never
> seems to return the upper bound).]
Again, referring to the latest draft:
"A uniform_real_distribution random number distribution produces random numbers
x, a <= x < b"
So that does appear to be a bug
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43660