comp.lang.ada
 help / color / mirror / Atom feed
* Re: Random Number Generators
@ 1992-05-08  4:56 Gregory Aharonian
  0 siblings, 0 replies; 4+ messages in thread
From: Gregory Aharonian @ 1992-05-08  4:56 UTC (permalink / raw)


     There is a better method available.  Check ACM Transactions on Modeling
and Computer Simulation, Volume 1, Number 2, April 1991, page 99-112.  There
is an article by  Shu Tezuka and Pierre L'Ecuyer titled  "Efficent and
Portable Combined Tausworthe Random Number Generators" which has some nice
mathematics in it.  They have a five line program in C which generates
random numbers with a period length of 10^18.  The program is easily converted
to Ada, and any other language.

     This reference is just one of 20,000 in my database of information on
all of the reusable source code available from government and university
laboratories.  The 1992 edition of the directory of the database if now
available for $149.  A postal address to me will get you a brochure.  A
contract from the government would get everyone on Internet a copy of the
database  :-)

Gregory Aharonian
Source Translation & Optimization
617-489-3727

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Random number generators
@ 2000-09-12 17:08 Mathias Dolidon
  2000-09-12 18:09 ` Robert A Duff
  2000-09-13 11:12 ` Phil Slater
  0 siblings, 2 replies; 4+ messages in thread
From: Mathias Dolidon @ 2000-09-12 17:08 UTC (permalink / raw)


I know that if I initialize a given generator with a given value, that
my program is compiled by a given compiler and runs on a given machine,
the output values of the genertor will always be the sames.Let's suppose
I get 1 2 3 4 (let's don't make it complicated ;). If now I compile the
same program with another compiler or I make it run on another computer
(or both), will I still get 1 2 3 4 ? Or is this unspecified by the
language ?

Thank you,
Mathias



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Random number generators
  2000-09-12 17:08 Random number generators Mathias Dolidon
@ 2000-09-12 18:09 ` Robert A Duff
  2000-09-13 11:12 ` Phil Slater
  1 sibling, 0 replies; 4+ messages in thread
From: Robert A Duff @ 2000-09-12 18:09 UTC (permalink / raw)


Mathias Dolidon <matd@netcourrier.com> writes:

> I know that if I initialize a given generator with a given value, that
> my program is compiled by a given compiler and runs on a given machine,
> the output values of the genertor will always be the sames.Let's suppose
> I get 1 2 3 4 (let's don't make it complicated ;). If now I compile the
> same program with another compiler or I make it run on another computer
> (or both), will I still get 1 2 3 4 ? Or is this unspecified by the
> language ?

No, you will not necessarily get the same sequence.

- Bob



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Random number generators
  2000-09-12 17:08 Random number generators Mathias Dolidon
  2000-09-12 18:09 ` Robert A Duff
@ 2000-09-13 11:12 ` Phil Slater
  1 sibling, 0 replies; 4+ messages in thread
From: Phil Slater @ 2000-09-13 11:12 UTC (permalink / raw)


Mathias

The implication from AARM A.5.2.32a is that you would be likely to get a
different sequence since it says:

"Implementation defined: The algorithms for random number generation."

Phil Slater


Mathias Dolidon wrote:

> I know that if I initialize a given generator with a given value, that
> my program is compiled by a given compiler and runs on a given machine,
> the output values of the genertor will always be the sames.Let's suppose
> I get 1 2 3 4 (let's don't make it complicated ;). If now I compile the
> same program with another compiler or I make it run on another computer
> (or both), will I still get 1 2 3 4 ? Or is this unspecified by the
> language ?
>
> Thank you,
> Mathias




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-09-13 11:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-05-08  4:56 Random Number Generators Gregory Aharonian
  -- strict thread matches above, loose matches on Subject: below --
2000-09-12 17:08 Random number generators Mathias Dolidon
2000-09-12 18:09 ` Robert A Duff
2000-09-13 11:12 ` Phil Slater

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