comp.lang.ada
 help / color / mirror / Atom feed
* searhing for Marsaglia's random
@ 1998-02-03  0:00 Denis WALLEZ-MASKAY
  1998-02-03  0:00 ` Pat Rogers
  1998-02-03  0:00 ` BSCrawford
  0 siblings, 2 replies; 5+ messages in thread
From: Denis WALLEZ-MASKAY @ 1998-02-03  0:00 UTC (permalink / raw)



Hello,

  Would anyone be able to send me the following article:
=      M G Harmon & T P Baker, ``An Ada Implementation of Marsaglia's
=      "Universal" Random Number Generator'', Ada Letters, late 1987.
  Litterature (and some consulting) suggests I should use it; even though
I am still to be convinced.

Denis.w-m




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

* Re: searhing for Marsaglia's random
  1998-02-03  0:00 searhing for Marsaglia's random Denis WALLEZ-MASKAY
  1998-02-03  0:00 ` Pat Rogers
@ 1998-02-03  0:00 ` BSCrawford
  1 sibling, 0 replies; 5+ messages in thread
From: BSCrawford @ 1998-02-03  0:00 UTC (permalink / raw)



Denis asked,

<<  Would anyone be able to send me the following article:
      M G Harmon & T P Baker, ``An Ada Implementation of Marsaglia's
      "Universal" Random Number Generator'', Ada Letters, late 1987. >>

The Nov-Dec 87 issue of Ada Letters contains an index of all 
articles appearing that year, but it does not list such an article. 

Further search reveals that the article appears in the Mar-Apr 88 
issue.  It is only three pages long.  Send me an email message 
if you would like me to create a photo copy and mail it to you. 

Bard Crawford
Stage Harbor Software




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

* Re: searhing for Marsaglia's random
  1998-02-03  0:00 searhing for Marsaglia's random Denis WALLEZ-MASKAY
@ 1998-02-03  0:00 ` Pat Rogers
  1998-02-12  0:00   ` Robert I. Eachus
  1998-02-03  0:00 ` BSCrawford
  1 sibling, 1 reply; 5+ messages in thread
From: Pat Rogers @ 1998-02-03  0:00 UTC (permalink / raw)




Denis WALLEZ-MASKAY wrote in message <34D756FA.78C7AAB9@BNP.Fr>...
>Hello,
>
>  Would anyone be able to send me the following article:
>=      M G Harmon & T P Baker, ``An Ada Implementation of Marsaglia's
>=      "Universal" Random Number Generator'', Ada Letters, late 1987.
>  Litterature (and some consulting) suggests I should use it; even though
>I am still to be convinced.
>
>Denis.w-m


Why not the Ada 95 built-in RNG?







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

* Re: searhing for Marsaglia's random
  1998-02-03  0:00 ` Pat Rogers
@ 1998-02-12  0:00   ` Robert I. Eachus
  1998-02-13  0:00     ` Nick Roberts
  0 siblings, 1 reply; 5+ messages in thread
From: Robert I. Eachus @ 1998-02-12  0:00 UTC (permalink / raw)




    I won't tell you why you should use the random-number generator in
GNAT, but I will tell you what some of the limitations (and
advantages) of the Marsaglia's generator are...

    First the Marsaglia generator is not easy to seed.  There are good
starting seed values, and horrible ones, and the package provides no
guidance to selecting one other than the default.

    Second, the Marsaglia generator, by design, generates 24-bit
values between 0.0 and 1.0.  This may be sufficient for your purpose,
but beware.

    The period of the generator is very long.  One way to get around
the seed problem above is to store the current value between runs, and
keep sampling from the same sequence.

    Bad news though, is that the values generated are correlated.  In
particular if you plot pairs of points, you will see that they do not
cover the two-dimensional space, but lie in parallel lines.  The same
thing happens in higher dimensions.  (Technically the difference
between add with carry generators, like the Marsaglia generator and
linear congruential generators is tha in LCGs, the points all fall on
straight lines, and with AWBs, there are occaisonal one-bit shifts in
position.)

    (Well, maybe a bit about the generator in GNAT...  In most
applications, if the values returned by that generator can be shown to
be correlated, then factoring numbers is in P not NP.  In other words,
you won't have to worry about it.)

    Oh, if you want an executable copy of source for the Marsaglia
generator, it has been included with the VADS compiler for many years.
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




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

* Re: searhing for Marsaglia's random
  1998-02-12  0:00   ` Robert I. Eachus
@ 1998-02-13  0:00     ` Nick Roberts
  0 siblings, 0 replies; 5+ messages in thread
From: Nick Roberts @ 1998-02-13  0:00 UTC (permalink / raw)



Knuth, in one* of his wonderful Four Volumes of Enlightenment and Wisdom,
gives an algorithm for random numbers.  It's simple, but it works.  I'm no
expert on the subject, and I don't know it's particular relative strengths
and weaknesses -- I suspect others will be quick to the fray on this -- but
maybe worth a try?

* The second one, on numerical methods, I think.

-- 

== Nick Roberts ================================================
== Croydon, UK                       ===========================
==                                              ================
== Proprietor, ThoughtWing Software                   ==========
== Independent Software Development Consultant            ======
== Nick.Roberts@dial.pipex.com                              ====
== Voicemail & Fax +44 181-405 1124                          ===
==                                                            ==
==           I live not in myself, but I become               ==
===          Portion of that around me; and to me             ==
====         High mountains are a feeling, but the hum        ==
=======      Of human cities torture.
===========                             -- Byron [Childe Harold]


Robert I. Eachus <eachus@spectre.mitre.org> wrote in article
<EACHUS.98Feb12160803@spectre.mitre.org>... [all about RN algos]





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

end of thread, other threads:[~1998-02-13  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-03  0:00 searhing for Marsaglia's random Denis WALLEZ-MASKAY
1998-02-03  0:00 ` Pat Rogers
1998-02-12  0:00   ` Robert I. Eachus
1998-02-13  0:00     ` Nick Roberts
1998-02-03  0:00 ` BSCrawford

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