-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from mbroz/sync-rgb
Sync commits with dieharder-rgb repo
- Loading branch information
Showing
14 changed files
with
645 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
2016-07-21 David Bauer <[email protected]> | ||
|
||
* libdieharder/dab_filltree2.c: Updated to a g-test with correction | ||
with exact computed target | ||
* libdieharder/chisq.c: Correction applied | ||
* include/dieharder/libdieharder.h: tie-in new generator | ||
|
||
|
||
------------------------------------------------------------------------ | ||
r529 | rgbatduke | 2011-04-01 13:49:31 -0400 (Fri, 01 Apr 2011) | 117 lines | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* dab_birthdays1 test header. | ||
*/ | ||
|
||
/* | ||
* function prototype | ||
*/ | ||
int dab_birthdays1(Test **test, int irun); | ||
|
||
static Dtest dab_birthdays1_dtest __attribute__((unused)) = { | ||
"Diehard Birthdays Test", | ||
"dab_birthdays1", | ||
"\n\ | ||
#==================================================================\n\ | ||
# Diehard \"Birthdays\" test (modified).\n\ | ||
# This is a version of the Diehard Birthdays test, modified from the\n\ | ||
# original Dieharder implementation of it.\n\ | ||
# \n\ | ||
# This is a BIRTHDAY SPACINGS TEST\n\ | ||
# Choose m birthdays in a year of n days. List the spacings between \n\ | ||
# the birthdays. If j is the number of values that occur more than \n\ | ||
# once in that list, then j is asympotically Poisson distributed with \n\ | ||
# mean lambda = m^3/(4n). A Chi-Sq test is performed comparing the \n\ | ||
# seen distribution of repeated spacings to the Poisson distribution. \n\ | ||
# Simulations show that the approximation is better for larger n and \n\ | ||
# smaller lambda. However, since for any given run j must be an \n\ | ||
# integer, a small lambda value requires more runs to build up a good \n\ | ||
# statistic. This test uses m=1700 as the default, but it may \n\ | ||
# changed (via the -n (ntuple) option), up to a maximum value of \n\ | ||
# 4096. The value of n is fixed by the choice of generator, with \n\ | ||
# n=2^r, where r is the number of bits per word in the generator's \n\ | ||
# output (a maximum of 32 for this version of Dieharder). This test \n\ | ||
# prefers a larger t-count (-t option) and p-value samples set to 1 \n\ | ||
# (-p 1, which is the default).\n\ | ||
# \n\ | ||
# Be careful when running this test against generators with reduced \n\ | ||
# word sizes, as it may give false positives. When it doubt, check \n\ | ||
# against an assumed good generator that is set to produce the same \n\ | ||
# size output. As an example, for testing a generator with an output \n\ | ||
# size of 20 bits, using \"-n 50 -t 8000\" produced a test that \n\ | ||
# repeated passed an assumed good generator at \"-p 100\", but had \n\ | ||
# trouble at \"-p 500\". Alternately, raising the t-count also shows \n\ | ||
# that m of 50 isn't low enough to give a good approximation. For \n\ | ||
# long tests of generators with an output size smaller than 30 bits, \n\ | ||
# producing the target by simulation instead of relying on the \n\ | ||
# Poisson approximation will probably be necessary.\n\ | ||
# \n\ | ||
#==================================================================\n", | ||
1, | ||
2000, | ||
1, | ||
dab_birthdays1, | ||
0 | ||
}; | ||
|
||
/* | ||
* Global variables | ||
uint dab_birthdays1_nms,dab_birthdays1_nbits; | ||
uint *dab_birthdays1_rand_uint; | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* | ||
* dab_opso2 test header. | ||
*/ | ||
|
||
/* | ||
* function prototype | ||
*/ | ||
int dab_opso2(Test **test, int irun); | ||
|
||
static Dtest dab_opso2_dtest __attribute__((unused)) = { | ||
"DAB OPSO2", | ||
"dab_opso2", | ||
"\ | ||
#==================================================================\n\ | ||
# DAB OPSO2 Test\n\ | ||
# This test is misnamed. It is an evolution of the OPSO test from\n\ | ||
# the original Diehard program. However, it does not use\n\ | ||
# DAB OPSO2 Test\n\ | ||
# This test is misnamed. It is an evolution of the OPSO test from\n\ | ||
# the original Diehard program. However, it does not use\n\ | ||
# overlapping samples. Additionally, it returns two p-values,\n\ | ||
# the second of which follows the Pairs-Sparse-Occupancy part of\n\ | ||
# the name. The first p-value effectively takes both letters from\n\ | ||
# the same input word. However, that isn't any different from\n\ | ||
# having 1-letter words, where each letter is twice as long.\n\ | ||
# \n\ | ||
# This verion uses 2^24 slots. The first p-value thus takes 24\n\ | ||
# bits directly from each input word. The second p-value is based\n\ | ||
# on two 12-bit letters from each of two words; each pair of input\n\ | ||
# words will produce two output \"words\".\n\ | ||
# \n\ | ||
# This test will give a false positive for all generators with an\n\ | ||
# output word of less than 24 bits.\n\ | ||
# \n\ | ||
# Note tsamples is set to 2^26 = 67108864, and cannot be varied.\n\ | ||
#\n\ | ||
# Diehard Overlapping Pairs Sparse Occupance (OPSO)\n\ | ||
# The OPSO test considers 2-letter words from an alphabet of \n\ | ||
# 1024 letters. Each letter is determined by a specified ten \n\ | ||
# bits from a 32-bit integer in the sequence to be tested. OPSO \n\ | ||
# generates 2^21 (overlapping) 2-letter words (from 2^21+1 \n\ | ||
# \"keystrokes\") and counts the number of missing words---that \n\ | ||
# is 2-letter words which do not appear in the entire sequence. \n\ | ||
# That count should be very close to normally distributed with \n\ | ||
# mean 141,909, sigma 290. Thus (missingwrds-141909)/290 should \n\ | ||
# be a standard normal variable. The OPSO test takes 32 bits at \n\ | ||
# a time from the test file and uses a designated set of ten \n\ | ||
# consecutive bits. It then restarts the file for the next de- \n\ | ||
# signated 10 bits, and so on. \n\ | ||
# \n\ | ||
#==================================================================\n", | ||
1, | ||
67108864, | ||
2, | ||
dab_opso2, | ||
0 | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.