From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6618 invoked by alias); 6 Apr 2010 10:41:21 -0000 Received: (qmail 6511 invoked by uid 48); 6 Apr 2010 10:40:51 -0000 Date: Tue, 06 Apr 2010 10:41:00 -0000 Message-ID: <20100406104051.6510.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/43660] range of random-number generator seems wrong/confusing In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "redi at gcc dot gnu dot org" 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 X-SW-Source: 2010-04/txt/msg00460.txt.bz2 ------- 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 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