Mail Archives: djgpp-workers/2000/04/27/06:12:57
On 26 Apr 00, at 7:07, Eli Zaretskii wrote:
> Assuming that Marsaglia's suite at the above URL is Free Software, it
> would be nice to add some or all of it to djtst distro, together with
> some driver program that would interpret the results in a way that can
> be understood by humans even if they don't know much about this
> subject.
The Fortran source code (and the extreme ugly f2c translation, you
need to have f2c installed to compile and link it) of diehard is
available. I have seen no license or copyright. I have the following
message of Marsaglia saved on disk:
|A question of copyright has also been raised. Unlike
|DIEHARD, there is no copyright on the code [some source for PRNGs
|Marsaglia posted] below. You are free to use it in any way you want,
|but you may wish to acknowledge the source, as a courtesy.
I do have a C rewrite of diehard. It is somewhat ugly and makes in
some places unportable assumptions about the sizes of the integral
types. It is a merge of Marsaglias tests and some of my random number
tests. In non-verbose mode my program may come close to what you have
asked for. It will only report suspicious results. But something
like: "Congratulations, your PRNG has passed all tests" or "Sorry,
your PRNG failed" is not easy possible. If you see a suspicious p-
value, you have to rerun the test (the PRNG will be seeded
differently), and compare the results. And, of the many p-values
calculated, some will always be suspicious.
> That would allow to quickly compare different implementations and/or
> small modifications in existing code. Right now, the RNGs available
> in libc do not have *any* test suite.
I think, the only PRNG in libc, that may be changed, is rand(). The
rand48 family seems to be what I know from Cray and/or some Unix
variants. The random() seems to be BSD random. So changing (even
advancing) these may break some code. (To test a port to djgpp, you
may run a simulation and compare with the expected results.)
When there really is interest, I may be able to clarify the legal
issuses. But I somewhat doubt the general usefulness of my program
for DJGPP.
- Raw text -