Skip to content
/ diead Public

A small suite to test 32-bit pseudorandom number generators

Notifications You must be signed in to change notification settings

ilvn/diead

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

diead

This is a small suite to test quality of pseudorandom number generators.

The idea should be familiar. Write your generator as a parameterless C function that returns a 32-bit unsigned integer. Place the function in main.c and use

		make
		./diead

to compile and run the binary to apply few statistical tests on the generator. Look at p-values and have fun.

Rationale

The original Marsaglia's diehard is somewhat broken, obsolete and long abandoned.

Its improved replacement, dieharder by Robert G. Brown, is too universal and a bit hushed. It is a great tool to test a ready PRNG but less useful to debug a design.

diead is a simpler alternative. It uses only few tests that enough to assess general quality. Like diehard, it also provides enough details to give you a better idea about PRNG behavior.

This suite is not a mutually exclusive replacement for other statistical test suites. In fact, no suite is.

Use diead while designing a pseudorandom generator. Once you done, double check the final result with any tool listed in the Stand-ins below.

Attribution

This project is based on the source code by CISC, Department of Computer Science, HKU.

The code was modified to be properly compilable on a 64-bit platform with modern compilers.

The original unmodified source code is in the ./original subdirectory, for reference.

Stand-ins

About the name

The name is a clear mockery of diehard and dieharder. It is the abbreviation for Die Another Day. Also, missing h and r presumably signify less tests than in diehard.

About

A small suite to test 32-bit pseudorandom number generators

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published