From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34507 invoked by alias); 9 Apr 2017 17:31:16 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 34381 invoked by uid 89); 9 Apr 2017 17:31:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_05,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=alas, oliver X-HELO: laurel.swan.ac.uk Received: from laurel.swan.ac.uk (HELO laurel.swan.ac.uk) (137.44.100.6) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 09 Apr 2017 17:31:05 +0000 Received: from [137.44.60.175] (helo=hub.tawe.swan.ac.uk) by laurel.swan.ac.uk with esmtp (Exim 4.87) (envelope-from ) id 1cxGg4-0004yt-7A for gcc-help@gcc.gnu.org; Sun, 09 Apr 2017 18:31:04 +0100 Received: from csltok.swansea.ac.uk (137.44.60.123) by ISS-PARKEXCH2.tawe.swan.ac.uk (137.44.60.175) with Microsoft SMTP Server (TLS) id 15.1.396.30; Sun, 9 Apr 2017 18:31:03 +0100 Date: Sun, 09 Apr 2017 17:31:00 -0000 From: Oliver Kullmann To: Subject: where are the implementations for ? Message-ID: <20170409173101.GA10474@csltok.swansea.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-ClientProxiedBy: ISS-BAYEXCH2.tawe.swan.ac.uk (137.44.60.177) To ISS-PARKEXCH2.tawe.swan.ac.uk (137.44.60.175) X-IsSubscribed: yes X-SW-Source: 2017-04/txt/msg00036.txt.bz2 Hello, I thought that with the facilities from we had good and well-defined ones -- but alas, only recently I realised that only say the Mersenne twister is well-defined in the standard, but roughly everything else is up to the implementer. Since reproducibility is crucial for us (as with most scientific applications), thus we need to implement ourselves the algorithms for 1. std::seed_seq 2. std::uniform_int_distribution 3. std::bernoulli_distribution (only for default p=0.5). Easiest would be to copy (and specialise) the gcc-implementations. I searched for it in the source-code, but couldn't find it: Where do I find the implementations for ? Thanks for your help! Oliver