From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80017 invoked by alias); 9 Mar 2015 12:41:08 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 79986 invoked by uid 48); 9 Mar 2015 12:41:04 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/43660] range of random-number generator seems wrong/confusing Date: Mon, 09 Mar 2015 12:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-03/txt/msg00935.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43660 --- Comment #5 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #2) > (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 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 PR 64351 deals with that case.