 |
|
List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Re: Maple and PseudoRandomGenerator
| [MUG] Re: Maple and PseudoRandomGenerator |
|
Author: Maple User Group
Posted: Tue, 29 Oct 2002 14:30:28 -0500
|
>> From: Maple User Group "maple_gr"
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Sun, 27 Oct 2002 11:21:52 -0500 (EST)
From: Carl Devore "devore"
To: "maple-list"
Subject: Maple and PseudoRandomGenerator
On Wed, 23 Oct 2002, Jerome BENOIT wrote:
> in a few words, the Maple "good uniform generators" is bad ?
> Is there better Random Numenber Generator available in Maple somewhere ?
I did not say that it was bad. I don't know what other replies that you
may have received via private email. I just pointed out that the minor
error of dividing by 10^12 rather than 10^12-11 is often made. I did not
say that it was good either. There are a large number of tests of randon
number generators (RNGs) presented in _The Art of Computer Programming:
Volume 2_. Knuth devotes 260 pages to RNGs. The world's leading expert
on RNGs, George Marsaglia, reads this mailing list (or reads it
occasionally). Perhaps he has something to say.
The linear congruential generator would certainly be bad in a gambling
application, because it is possible for a savvy programmer to "crack" the
code and predict what the next number will be. But maybe it is good for
simulations.
-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-=*=-
Date: Mon, 28 Oct 2002 17:32:42 -0800 (PST)
From: Michael Monagan "mmonagan"
To: "maple-list"
Subject: Maple and PseudoRandomGenerator
Maple's rand(...) uses a linear congruential generator.
I.e. of the form x[k+1] = a*x[k] mod p where p = 10^12-11 is prime
and a = 427419669081 was a "randomly" chosen primitive element.
I tested the generator using the spectral test (as described in
Knuth in Vol II Semi numerical algorithms) and based on that
test this generator is better than all of the generators in his table
(because the modulus p used in Maple is bigger than his choices).
Mike
----------------------------------------------------------------
Dr. Michael Monagan,
Department of Mathematics, Tel: (604) 291-4279
Simon Fraser University, Fax: (604) 291-4947
Burnaby, BC, CANADA V5A 1S6 e-mail: "monagan"
|
[View Complete Thread]
Previous by date: [MUG] Re: How to plot with a constraint on the domain, Carl Devore
Next by date: [MUG] Re: Serious bug in LinearSolve, Maple User Group
Previous thread: [MUG] solving inequality, M A Suzen
Next thread: [MUG] Serious bug in LinearSolve, Luis Goddyn
|
|
|