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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6e2278eaed9619d6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-14 01:01:52 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: gautier_niouzes@hotmail.com (Gautier) Newsgroups: comp.lang.ada Subject: Re: Discrete random with given distribution ? Date: 14 Jun 2002 01:01:51 -0700 Organization: http://groups.google.com/ Message-ID: <17cd177c.0206140001.507d1333@posting.google.com> References: <3D08AB63.6AF60F95@despammed.com> <3D08C94B.A50AECFE@acm.org> NNTP-Posting-Host: 194.40.39.50 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1024041712 25786 127.0.0.1 (14 Jun 2002 08:01:52 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 14 Jun 2002 08:01:52 GMT Xref: archiver1.google.com comp.lang.ada:25928 Date: 2002-06-14T08:01:52+00:00 List-Id: > > F := FR.Random; Jeffrey Carter: > This can never return C. F <= 1.0, and for many generators, F < 1.0. > Also, if F = 0.9, this returns A. > > I suspect you need > > F < Threshold (I) I'm afraid this is not the main problem, since the probability of F obtaining any value (-12.0, 0.6 or 1.0) is 0... G.