From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Lotto simulation Date: Sun, 15 Jun 2014 21:53:11 +0200 Organization: A noiseless patient Spider Message-ID: References: <77cc4476-8c57-481b-afb9-8f53f8b16e37@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 15 Jun 2014 19:53:11 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="2b3884a634d8f846e0712b4e3a92507a"; logging-data="537"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19/HCYuovPWU1m/eDgu1cxd" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Cancel-Lock: sha1:ab3z96I68hxRuOZR1EhG5JgDHs4= X-Enigmail-Version: 1.6 Xref: news.eternal-september.org comp.lang.ada:20327 Date: 2014-06-15T21:53:11+02:00 List-Id: Le 15/06/2014 20:54, Stefan.Lucks@uni-weimar.de a écrit : > The alternative is to (2n) instantiate a single random generator (I've > forgotten the package name, but it is not A.N.Discrete_Random), which > just generates a Float F_Rand between 0 and 1. Then set R_I := > Truncate(1 + F_Rand * (50-I)). This is not equivalent. I don't remember the details, but in the making of Ada 95 there was a furious discussion between numericists about whether it was possible to make a discrete random generator given a floating point random generator. After megabytes of E-mail discussion, they concluded that NO, it was not possible, and therefore that Ada should have both. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr