comp.lang.ada
 help / color / mirror / Atom feed
From: brashear@ns1.sw-eng.falls-church.va.us (Philip Brashear)
Subject: Re: Strange results with random numbers with Gnat 3.10
Date: 1998/01/08
Date: 1998-01-08T00:00:00+00:00	[thread overview]
Message-ID: <692ia8$4kq@ns1.sw-eng.falls-church.va.us> (raw)
In-Reply-To: 34B3F618.DC9@uppsala.mail.telia.com


In article <34B3F618.DC9@uppsala.mail.telia.com>,
Andreas Almroth  <andreas.almroth@uppsala.mail.telia.com> wrote:
[... trying to adapt dice example in RM A5.2 ...]
>To my big suprise this was the result;
>
>Number  Frequency
>=================
>  1        249594
>  2        167104
>  3        166985
>  4        166687
>  5        166621
>  6         83009


Are you sure you used the example in the RM?  It's a two-dice example,
so the possible values are 2 .. 12, not 1 .. 6.  If you modified the
example to produce single-die results, are you sure you got the code
right?  (Honestly, though it seems easy, it's not trivial.)

Could you post your source?

(I wrote a two-dice version for the Ada Compiler Evaluation System, and,
as I recall, the earlier versions of GNAT produced acceptable results.)

Phil Brashear
EDS




      parent reply	other threads:[~1998-01-08  0:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-01-07  0:00 Strange results with random numbers with Gnat 3.10 Andreas Almroth
1998-01-07  0:00 ` Mats Weber
1998-01-08  0:00   ` Andreas Almroth
1998-01-08  0:00     ` Mats Weber
1998-01-08  0:00 ` Philip Brashear [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox